Multiple if conditions

  • Thread starter Thread starter DrHunter
  • Start date Start date
D

DrHunter

Hi all,

I want to write an if whereby if certain conditions are met by a reference
cell, a certain type or result is displayed. Here is an example...

Say cell A1= cat;

in another cell, i want to output certain comments depending on what cell A1
show. This is what i am trying to use, but i cannot get it to work

IF((A1 = cat,dog,rat)," ", "Not an animal")

the reason is A1 can be any of the three.

Is there a better way of doing this.

Any help will be very muchh welcomed
 
DrHunter,

=IF(OR(A1 ="cat",A1="dog",A1="rat"),"","Not an animal")


--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
thanks for the help AJ, but if there are a series of conditions, is there a
way i can call it in the IF function

Say assuming a column C1:C50 is named Animal, can i write

IF(A1=Animal, "true coment", "false comment")

Thanks
 
=IF(ISNA(MATCH(A1,Animal,0)),"not an animal","animal")

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
DrHunter

=IF(OR(A1="cat",A1="rat",A1="dog"),"animals","no animals")

You can change the "animals" to "" if you want nothing shown if animals are
present.

Gord Dibben Excel MVP
 
Back
Top