#1   Report Post  
Bill Martin -- (Remove NOSPAM from address)
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF & VLOOKUP FORMULA taxmom Excel Worksheet Functions 3 March 2nd 05 03:35 PM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"