Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Pepito Grillo wrote:
In some cases I would like to get a word or name insted of a letter as result. Something like the following: = IF(C5="01","John", IF(C5="02","Peter", IF(C5="03","Jose", IF(C5="04","Ronald", If you're looking to translate an arbitrary number of numbers into arbitrary or easily changed text, then I wouldn't mess with IF() statements which can be difficult to figure out or modify later on. I'd create a simple lookup table on a sheet somewhere and use the VLOOKUP statement. 01 John A 02 Peter B 03 Jose C then: Then to get "Peter" your use [ ] = VLOOKUP(2, A1:C3, 2) and to get "C" you use [ ] = VLOOKUP(3,A1:C3,3) That makes it very simple to modify the lookup table and to just glance at it and understand which number produces what result. Good luck.... Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF & VLOOKUP FORMULA | Excel Worksheet Functions | |||
Problem with VBA returning the contents of a long formula. | Excel Discussion (Misc queries) | |||
Match / Vlookup within an Array formula | Excel Discussion (Misc queries) | |||
Help with macro formula and variable | Excel Worksheet Functions | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions |