ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF OR FORMULA (https://www.excelbanter.com/excel-discussion-misc-queries/207630-if-formula.html)

Paula

IF OR FORMULA
 
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,AG1 9=LH),"YES","NO")

Many thanks
Paula


Harald Staff[_2_]

IF OR FORMULA
 
Hi Paula

You have to put text values in quotes:

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

HTH. Best wishes Harald

"Paula" wrote in message
...
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,AG1 9=LH),"YES","NO")

Many thanks
Paula



John C[_2_]

IF OR FORMULA
 
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",AG1 9="AZ",AG19="LH"),"YES","NO")
--
** John C **


"Paula" wrote:

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,AG1 9=LH),"YES","NO")

Many thanks
Paula


Daniel.C[_2_]

IF OR FORMULA
 
If AC is a string, you should use "AC"...
Daniel

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,AG1 9=LH),"YES","NO")

Many thanks
Paula




Paula

IF OR FORMULA
 
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?



"John C" wrote:

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",AG1 9="AZ",AG19="LH"),"YES","NO")
--
** John C **


"Paula" wrote:

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,AG1 9=LH),"YES","NO")

Many thanks
Paula


John C[_2_]

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

--
** John C **


"Paula" wrote:

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?



"John C" wrote:

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",AG1 9="AZ",AG19="LH"),"YES","NO")
--
** John C **


"Paula" wrote:

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,AG1 9=LH),"YES","NO")

Many thanks
Paula



All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com