#1   Report Post  
Posted to microsoft.public.excel.misc
superkopite
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default 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).
  #3   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
superkopite
 
Posts: n/a
Default 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

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 05:41 PM.

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"