ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using "OR" in an IF statement (https://www.excelbanter.com/excel-worksheet-functions/258306-using-if-statement.html)

Doug

Using "OR" in an IF statement
 
I am trying to use the command OR in an If statement and I am having no luck.
In Lotus 123 I could string commands by using #OR# to produce a common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO")) I can't
seem to make this work in Excel. Can anyone provide me with a correction?

Mike H

Using "OR" in an IF statement
 
Doug,

Like this

=IF(OR(J3="Invest",K3="Invest"),"The true condition","the false condition")

If the true or false condition is numeric then drop the quotes

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having no luck.
In Lotus 123 I could string commands by using #OR# to produce a common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO")) I can't
seem to make this work in Excel. Can anyone provide me with a correction?


Bob Phillips[_4_]

Using "OR" in an IF statement
 
="The "&LOWER(OR(J3="Invest",K3="Invest"))&" condition" :-)

--

HTH

Bob

"Mike H" wrote in message
...
Doug,

Like this

=IF(OR(J3="Invest",K3="Invest"),"The true condition","the false
condition")

If the true or false condition is numeric then drop the quotes

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having no
luck.
In Lotus 123 I could string commands by using #OR# to produce a common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO")) I
can't
seem to make this work in Excel. Can anyone provide me with a
correction?




Teethless mama

Using "OR" in an IF statement
 
=SIGN(COUNTIF(J3:K3,"invest"))


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having no luck.
In Lotus 123 I could string commands by using #OR# to produce a common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO")) I can't
seem to make this work in Excel. Can anyone provide me with a correction?


Mike H

Using "OR" in an IF statement
 
Or with 'invest' in J3 or k3

="You could have miscon"&LOWER(OR(J3="Invest",K3="Invest"))&"d my advice to
the OP"

:)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Bob Phillips" wrote:

="The "&LOWER(OR(J3="Invest",K3="Invest"))&" condition" :-)

--

HTH

Bob

"Mike H" wrote in message
...
Doug,

Like this

=IF(OR(J3="Invest",K3="Invest"),"The true condition","the false
condition")

If the true or false condition is numeric then drop the quotes

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having no
luck.
In Lotus 123 I could string commands by using #OR# to produce a common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO")) I
can't
seem to make this work in Excel. Can anyone provide me with a
correction?



.


Bob Phillips[_4_]

Using "OR" in an IF statement
 
Miscontrued?

--

HTH

Bob

"Mike H" wrote in message
...
Or with 'invest' in J3 or k3

="You could have miscon"&LOWER(OR(J3="Invest",K3="Invest"))&"d my advice
to
the OP"

:)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Bob Phillips" wrote:

="The "&LOWER(OR(J3="Invest",K3="Invest"))&" condition" :-)

--

HTH

Bob

"Mike H" wrote in message
...
Doug,

Like this

=IF(OR(J3="Invest",K3="Invest"),"The true condition","the false
condition")

If the true or false condition is numeric then drop the quotes

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis
that
introduces the fewest assumptions while still sufficiently answering
the
question.


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having
no
luck.
In Lotus 123 I could string commands by using #OR# to produce a
common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO"))
I
can't
seem to make this work in Excel. Can anyone provide me with a
correction?



.




Mike H

Using "OR" in an IF statement
 
I knew you'd notice LOL
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Bob Phillips" wrote:

Miscontrued?

--

HTH

Bob

"Mike H" wrote in message
...
Or with 'invest' in J3 or k3

="You could have miscon"&LOWER(OR(J3="Invest",K3="Invest"))&"d my advice
to
the OP"

:)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Bob Phillips" wrote:

="The "&LOWER(OR(J3="Invest",K3="Invest"))&" condition" :-)

--

HTH

Bob

"Mike H" wrote in message
...
Doug,

Like this

=IF(OR(J3="Invest",K3="Invest"),"The true condition","the false
condition")

If the true or false condition is numeric then drop the quotes

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis
that
introduces the fewest assumptions while still sufficiently answering
the
question.


"Doug" wrote:

I am trying to use the command OR in an If statement and I am having
no
luck.
In Lotus 123 I could string commands by using #OR# to produce a
common
result. For example: =IF(J3="INVEST" #OR# IF(K3 = "INVEST",1,"NO"))
I
can't
seem to make this work in Excel. Can anyone provide me with a
correction?


.



.



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

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