combination or "if" and "or" formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

=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.
 
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
 
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)?
 
Back
Top