If and AND?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
=IF(OR(ISNUMBER(FIND({"AA","AB"},A1))),"Class 1",IF(A1="DDD","Class
2",IF(OR(ISNUMBER(FIND({"AC","CD","GH"},A1))),"Class 3",IF(A1="BB","Class
4","unspecified input"))))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top