ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with If statment (https://www.excelbanter.com/excel-discussion-misc-queries/174814-help-if-statment.html)

pm

Help with If statment
 
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","")))))

RagDyeR

Help with If statment
 
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!
================================================== ===


"pm" wrote in message
...
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","")))))



Mike Rogers[_2_]

Help with If statment
 
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","")))))

"pm" wrote:

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

Help with If statment
 
Thanks Mike...it works!

"Mike Rogers" wrote:

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","")))))

"pm" wrote:

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","")))))



All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com