ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF with "or" (https://www.excelbanter.com/excel-worksheet-functions/101048-if.html)

Katie

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.

Marcelo

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.


Marcelo

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.


Katie

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.


RagDyeR

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.



Sasa Stankovic

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.




RagDyeR

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.



Katie

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.





All times are GMT +1. The time now is 06:57 AM.

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