text IF

B

Be18

I want to use text as a logical in an IF formula which I am sure you must be
ablr to do but I can't seem to figure it out. For example if D19 is sch, i
want E19 to = liz but if D19 is TCh i want E19 to = lex or if D19 is POS then
E19 = mav etc.
Please can someone help me?
 
J

JE McGimpsey

One way:

=IF(D19="sch","liz",IF(D19="TCh","lex",IF(D19="POS","mav","other")))

However, you're limited to 7 levels of nesting pre-XL07.

You may do better with a lookup. For instance:

J K
1 sch liz
2 TCh lex
3 POS mav

Then use the formula

=VLOOKUP(D19,J:K,2,FALSE)

or, if it's possible that D19 has a value not in the table:

=IF(ISNA(VLOOKUP(D19,J:K,2,FALSE)),"other",VLOOKUP(D19,J:K,2,FALSE)
 
B

Be18

Thanks for your reply. My formula looks like the first one, as i only have
five, however when i click out of the box it doesn't calculate and i can
still see the formula! Any extra help?
Thank u very much
 
D

Dave Peterson

Check your other thread.
Thanks for your reply. My formula looks like the first one, as i only have
five, however when i click out of the box it doesn't calculate and i can
still see the formula! Any extra help?
Thank u very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top