Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 504
Default combination or "if" and "or" formulas

=IF(OR(SCHEDULE!B11<"OFF",SCHEDULE!B11<"PTO"),"8 ","0")

Whats wrong with my formula? I would like it post an 8 when B11 on the
SCHEDULE workbook shows anything other than OFF or PTO, and a 0 otherwise. It
works for the OFF, but not for the PTO.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default combination or "if" and "or" formulas

Use AND() instead.

Look at this logic and see if it's what you're looking for:

B11 B11<"OFF" B11<"PTO" OR AND
OFF FALSE TRUE TRUE FALSE
PTO TRUE FALSE TRUE FALSE
ABC TRUE TRUE TRUE TRUE



In article ,
Kevin wrote:

=IF(OR(SCHEDULE!B11<"OFF",SCHEDULE!B11<"PTO"),"8 ","0")

Whats wrong with my formula? I would like it post an 8 when B11 on the
SCHEDULE workbook shows anything other than OFF or PTO, and a 0 otherwise. It
works for the OFF, but not for the PTO.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default combination or "if" and "or" formulas

Try reversing the logic:

=IF(OR(SCHEDULE!B11={"off","pto",""}),0,8)

Biff

"Kevin" wrote in message
...
=IF(OR(SCHEDULE!B11<"OFF",SCHEDULE!B11<"PTO"),"8 ","0")

Whats wrong with my formula? I would like it post an 8 when B11 on the
SCHEDULE workbook shows anything other than OFF or PTO, and a 0 otherwise.
It
works for the OFF, but not for the PTO.

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 524
Default combination or "if" and "or" formulas

Sat, 21 Apr 2007 10:56:04 -0700 from Kevin
:
=IF(OR(SCHEDULE!B11<"OFF",SCHEDULE!B11<"PTO"),"8 ","0")

Whats wrong with my formula? I would like it post an 8 when B11 on the
SCHEDULE workbook shows anything other than OFF or PTO, and a 0 otherwise. It
works for the OFF, but not for the PTO.


Your condition is "if B11 is different from 'OFF' or B11 is different
from 'PTO'". Well, it will always be different from at least one of
them. You could change the OR to AND -- or you could de-obscurify the
logic and write

=if( or(Schedule!B11="OFF",Schedule!B11="PTO"), "0", "8")

In other words, you want a "0" when B11 is OFF or PTO, and an 8" when
it's neither one.

By the way: did you really mean to put "0" and "8" (text), or 0 and 8
without quotes (numeric)?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
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
Combine logical formulas "if", "and", "or" pscu Excel Discussion (Misc queries) 5 November 2nd 06 07:43 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 07:19 AM.

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"