#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 138
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 138
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 105
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"