Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"