Help with If statment

P

pm

I've created this if statment, but it's not returning the the appropriate
values.....please help. Thanks.

=IF(C5="801","Beaumont",IF(C5="APS803"="Lafayette",IF(C5="805"="Houston",IF(C5="806"="San Antonio",IF(C5="810"="Dallas","")))))
 
R

RagDyeR

If your lookup values are *all* text, this should work:

=IF(C5="801","Beaumont",IF(C5="APS803","Lafayette",IF(C5="805","Houston",
IF(C5="806","San Antonio",IF(C5="810","Dallas","")))))

When you use quotes around numbers, that makes then Text.
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


I've created this if statment, but it's not returning the the appropriate
values.....please help. Thanks.

=IF(C5="801","Beaumont",IF(C5="APS803"="Lafayette",IF(C5="805"="Houston",IF(C5="806"="San
Antonio",IF(C5="810"="Dallas","")))))
 
M

Mike Rogers

pm

Try this, works for me now, you have a few displaced "=" signs

Mike Rogers

=IF(C5="801","Beaumont",IF(C5="APS803","Lafayette",IF(C5="805","Houston",IF(C5="806","San Antonio",IF(C5="810","Dallas","")))))
 
P

pm

Thanks Mike...it works!

Mike Rogers said:
pm

Try this, works for me now, you have a few displaced "=" signs

Mike Rogers

=IF(C5="801","Beaumont",IF(C5="APS803","Lafayette",IF(C5="805","Houston",IF(C5="806","San Antonio",IF(C5="810","Dallas","")))))
 
Top