Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
Me again.... :)
Should be simple, but for some reason I can get it to work... Formulae in cell a5, needs to say... If cell a1 = "Bird", then display cell b1 If cell a1 = "Cat", then display cell b2 If cell a1 - "Seed" or "Dish" then display "N/A" I thought it was a nested if with an and and a or, but mine does not seem to work... Thanks guys.... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
=if(a1="bird",b1,if(a1="cat",b2,if(or(a1="Seed",a1 ="Dish"),"N/A","none of
them"))) ....should work Rob "Darin Kramer" wrote: Me again.... :) Should be simple, but for some reason I can get it to work... Formulae in cell a5, needs to say... If cell a1 = "Bird", then display cell b1 If cell a1 = "Cat", then display cell b2 If cell a1 - "Seed" or "Dish" then display "N/A" I thought it was a nested if with an and and a or, but mine does not seem to work... Thanks guys.... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
Darin,
=IF(A1="Bird",B1,IF(A1="Cat",B2,IF(OR(A1="Seed",A1 ="Dish"),"N/A"))) Does this work? Pete "Darin Kramer" wrote: Me again.... :) Should be simple, but for some reason I can get it to work... Formulae in cell a5, needs to say... If cell a1 = "Bird", then display cell b1 If cell a1 = "Cat", then display cell b2 If cell a1 - "Seed" or "Dish" then display "N/A" I thought it was a nested if with an and and a or, but mine does not seem to work... Thanks guys.... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
Darin,
How about: =IF(A1="Bird",B1,IF(A1="Cat",B2,IF(OR(A1="Seed",A1 ="Dish"),"N/A","All Wrong"))) NickHK "Darin Kramer" wrote in message ... Me again.... :) Should be simple, but for some reason I can get it to work... Formulae in cell a5, needs to say... If cell a1 = "Bird", then display cell b1 If cell a1 = "Cat", then display cell b2 If cell a1 - "Seed" or "Dish" then display "N/A" I thought it was a nested if with an and and a or, but mine does not seem to work... Thanks guys.... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
Thanks, Works perfectly *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
If, Or and an And
You might want to use the NA() function rather than text "N/A" as well, as
you can error check that using IF(ISNA... -- HTH RP (remove nothere from the email address if mailing direct) "NickHK" wrote in message ... Darin, How about: =IF(A1="Bird",B1,IF(A1="Cat",B2,IF(OR(A1="Seed",A1 ="Dish"),"N/A","All Wrong"))) NickHK "Darin Kramer" wrote in message ... Me again.... :) Should be simple, but for some reason I can get it to work... Formulae in cell a5, needs to say... If cell a1 = "Bird", then display cell b1 If cell a1 = "Cat", then display cell b2 If cell a1 - "Seed" or "Dish" then display "N/A" I thought it was a nested if with an and and a or, but mine does not seem to work... Thanks guys.... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|