Help with If statment

  • Thread starter Thread starter pm
  • Start date Start date
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","")))))
 
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","")))))
 
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","")))))
 
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","")))))
 

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

Back
Top