![]() |
Assign values to text within a cell
I would like to know which single function I should use to assign a number
value to a chosen set of words within a cell and place the value in another cell ie: if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1 |
on cell d17 in sheet2 type this formula
=vlookup(sheet1!c4,{"high",3;"medium",2;"low",1},2 ,0) It will give N/a if the values are any other than high,medium or low "Bob" wrote in message ... I would like to know which single function I should use to assign a number value to a chosen set of words within a cell and place the value in another cell ie: if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1 |
If worksheet1 will always have one of the three values:
D17: =MATCH(Worksheet1!C4,{"Low","Medium","High"},0) If not: =IF(ISNA(MATCH(Worksheet1!C4,{"Low","Medium","High "},0)),"", MATCH(Worksheet1!C4,{"Low","Medium","High"},0)) In article , Bob wrote: I would like to know which single function I should use to assign a number value to a chosen set of words within a cell and place the value in another cell ie: if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1 |
All times are GMT +1. The time now is 02:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com