#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 130
Default IF with "or"

I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I know
And is displayed as "*".

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default IF with "or"

hi Katie,

if(or(A2="BLUE",A2="RED"),KEEP,"")

hth
regards from Brazil
Marcelo

"Katie" escreveu:

I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I know
And is displayed as "*".

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default IF with "or"

sorry i forgot the quotes on "keep"

=if(or(A2="BLUE",A2="RED"),"KEEP","")

regards

"Katie" escreveu:

I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I know
And is displayed as "*".

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 130
Default IF with "or"

Okay. Let me make this a little more confusing. What I have in there now is-

=IF((F2="WTD")*(J2="Approved"),"Keep","!")

But what I need to say is, If J2="Approved" or "Reversed".. How would I put
that in?
"Marcelo" wrote:

sorry i forgot the quotes on "keep"

=if(or(A2="BLUE",A2="RED"),"KEEP","")

regards

"Katie" escreveu:

I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I know
And is displayed as "*".

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default IF with "or"

Are either of these what you're looking for:

=IF(OR(A2="Blue",A2="Red"),"Keep","Neither")

=IF(OR(A2={"Blue","Red"}),"Keep","Neither")

=IF((A2="Blue")+(A2="Red"),"Keep","Neither")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Katie" wrote in message
...
I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I
know
And is displayed as "*".

Thank you.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default IF with "or"

this formula should do just fine (I tested and it worked):
=IF(OR(A2="blue",A2="red"),"KEEP","")

"Katie" wrote in message
...
I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I
know
And is displayed as "*".

Thank you.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default IF with "or"

Try this:

=IF(OR(J2={"Approved","Reversed"}),"Keep","!")
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Katie" wrote in message
...
Okay. Let me make this a little more confusing. What I have in there now
is-

=IF((F2="WTD")*(J2="Approved"),"Keep","!")

But what I need to say is, If J2="Approved" or "Reversed".. How would I
put
that in?
"Marcelo" wrote:

sorry i forgot the quotes on "keep"

=if(or(A2="BLUE",A2="RED"),"KEEP","")

regards

"Katie" escreveu:

I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I
know
And is displayed as "*".

Thank you.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 130
Default IF with "or"

Fantastic. Thank you both of you!

"Ragdyer" wrote:

Are either of these what you're looking for:

=IF(OR(A2="Blue",A2="Red"),"Keep","Neither")

=IF(OR(A2={"Blue","Red"}),"Keep","Neither")

=IF((A2="Blue")+(A2="Red"),"Keep","Neither")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Katie" wrote in message
...
I know this is a crazy question but I was wondering if I want to say,

If A2 = "blue" or "red" then display "keep". How do I input the "or". I
know
And is displayed as "*".

Thank you.



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax to "OR" 3 "ISERROR" conditions Mike K Excel Worksheet Functions 6 July 22nd 06 04:18 PM
Sumproduct-multiple criteria for same range "OR" Deeds Excel Worksheet Functions 3 May 18th 06 04:43 PM
Adding "OR" to a Sumproduct Formula carl Excel Worksheet Functions 0 March 21st 06 06:43 PM
Adding "OR" to a Sumproduct Formula Duke Carey Excel Worksheet Functions 0 March 21st 06 06:41 PM
Criteria using "Or" and parameter query Troy Man Excel Discussion (Misc queries) 2 February 28th 06 05:56 AM


All times are GMT +1. The time now is 05:08 PM.

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

About Us

"It's about Microsoft Excel"