Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coding with several arguments
Hi all. I have a lot of data in columns in text format that I want to
code in to whole numbers. eg. a lot of rows in say column A than contain either "red", "blue", "black" etc. I need a formula (ideally able to placed on a different sheet!) for corresponding rows in a new column eg: C, that would say: if A1 "red" then C1=0, if A1="blue" then C1=2, if A1="black" then C1=3 and so forth with up to 20 arguments!. Is this at all possiable. Thanks. Vince |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
coding with several arguments
Vinnie,
Yes it is and it uses vlookup. Make a table on a sheet with the code table [A] [b] red 0 blue 2 black 3 ..... and so now on your new sheet in the first row what you wnat the information enter (here i assume A1 on sheet1 with the lookup table on sheet2 in columns a and b. =vlookup('sheet1'!A1,'sheet2'!A:B,2,false) and then copy it down the column. 'sheet1'!A1 = the lookup value 'sheet2'!A:B = the lookup table 2 = the answer lookup is in the second column false = find an exact match -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "vinnie123" wrote: Hi all. I have a lot of data in columns in text format that I want to code in to whole numbers. eg. a lot of rows in say column A than contain either "red", "blue", "black" etc. I need a formula (ideally able to placed on a different sheet!) for corresponding rows in a new column eg: C, that would say: if A1 "red" then C1=0, if A1="blue" then C1=2, if A1="black" then C1=3 and so forth with up to 20 arguments!. Is this at all possiable. Thanks. Vince |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formulae containing more than 7 arguments? | Excel Worksheet Functions | |||
Formulas that refer to (several) other columns for arguments... | Excel Worksheet Functions | |||
How to see the chart coding? | Charts and Charting in Excel | |||
Arguments box on form | Excel Discussion (Misc queries) | |||
Passing Variable Number of Arguments to a Sub | Excel Discussion (Misc queries) |