ExcelBanter

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

superkopite

IF and OR
 

Hiya guys and gals

I can't believe i cannot work this out i am having a real stupid moment
(mind you it is 3:30am!)

The code that i have is;

=IF(B3="OFF",0,1)

and what i need to do is the add an or statement that will return a
value of 0 if B3 is either "OFF" or empty

This is my attempt at the code;
=IF(OR(B3="OFF"," "),0,1)

Could someone please tell me what i have done wrong.

Cheers

James


--
superkopite
------------------------------------------------------------------------
superkopite's Profile: http://www.excelforum.com/member.php...o&userid=29496
View this thread: http://www.excelforum.com/showthread...hreadid=513925


[email protected]

IF and OR
 
"superkopite" wrote:
what i need to do is the add an or statement that will
return a value of 0 if B3 is either "OFF" or empty
This is my attempt at the code;
=IF(OR(B3="OFF"," "),0,1)


=IF(OR(B3="OFF",B3=""), 0, 1)

Note: No space between "". Or replace B3="" with
ISBLANK(B3).

Biff

IF and OR
 
Hi!

Try this:

=IF(OR(B3={"off",""}),0,1)

Biff

"superkopite"
wrote in message
...

Hiya guys and gals

I can't believe i cannot work this out i am having a real stupid moment
(mind you it is 3:30am!)

The code that i have is;

=IF(B3="OFF",0,1)

and what i need to do is the add an or statement that will return a
value of 0 if B3 is either "OFF" or empty

This is my attempt at the code;
=IF(OR(B3="OFF"," "),0,1)

Could someone please tell me what i have done wrong.

Cheers

James


--
superkopite
------------------------------------------------------------------------
superkopite's Profile:
http://www.excelforum.com/member.php...o&userid=29496
View this thread: http://www.excelforum.com/showthread...hreadid=513925




superkopite

IF and OR
 

Thanks Biff

That is perfect!


--
superkopite
------------------------------------------------------------------------
superkopite's Profile: http://www.excelforum.com/member.php...o&userid=29496
View this thread: http://www.excelforum.com/showthread...hreadid=513925



All times are GMT +1. The time now is 10:09 PM.

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