IF OR FORMULA

P

Paula

Hi, I am using 2 very similar formulas - the first one has worked however the
second one returns the result "name" error. I am trying to say if cell
AG19=either LH,AC,EA,AR,BZ,AZ the answer is yes otherwise no, but I cant get
this to work, this is my formula,,, can you help me?



=IF(OR(AG19=ac,AG19=AR,AG19=EA,AG19=BZ,AG19=AZ,AG19=LH),"YES","NO")

Many thanks
Paula
 
H

Harald Staff

Hi Paula

You have to put text values in quotes:

=IF(OR(AG19="ac",AG19="AR",AG19="EA",

HTH. Best wishes Harald
 
J

John C

Are LH, AC, EA, AR, BZ, AZ all variables? If so, how are they defined. If
they are just supposed to be 2 letters, then they should each have quotes
around them.
=IF(OR(AG19="ac",AG19="AR",AG19="EA",AG19="BZ",AG19="AZ",AG19="LH"),"YES","NO")
 
P

Paula

Hi John,

Thanks for the great advice, I put quotes round them and that has worked...
could I add an additional condition to this formula to also only apply yes if
cell j19 equals a or blank?
 
J

John C

=IF(OR(OR(J19="A",J19=""),AG19="AC",AG19="AR",AG19="EA",AG19="BZ",AG19="AZ",AG19="LH"),"YES","NO")
 

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

Similar Threads


Top