Thread: If and AND?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default If and AND?

=IF(OR(ISNUMBER(FIND({"AA","AB"},A1))),"Class 1",IF(A1="DDD","Class
2",IF(OR(ISNUMBER(FIND({"AC","CD","GH"},A1))),"Cla ss 3",IF(A1="BB","Class
4","unspecified input"))))
--
David Biddulph

"mldancing" wrote in message
...
I have a question and hope someone can help:

Col A
AA, AB, AC, BB, DDD
AC, DDD
CD, GH, DDD

I want to create a formula in another column where if each row has

AA or AB, show "Class 1"
DDD show "Class 2"
AC or CD or GH show "Class 3"
BB show class "4"

Please help. Thank you.