IF & OR functions

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

Guest

I have a function

=IF(OR(B9,B10,B11,B12)>0,"PBR","PBO")

B9:B12 are numerical values and the cell format is number.

If all the cells are blank the result is #VALUE!

If one of the cells has a number then the formula evaluates correctly and
displays text PBR

If I remove the OR part from the equation and just use one cell (e.g. B9 =
blank)

=IF(B9>0,"PBR","PBO") then the result is PBO

Why doesn't it work with the OR and blank cells?
 
ivory_kitten said:
I have a function

=IF(OR(B9,B10,B11,B12)>0,"PBR","PBO")

B9:B12 are numerical values and the cell format is number.

If all the cells are blank the result is #VALUE!

If one of the cells has a number then the formula evaluates correctly and
displays text PBR

If I remove the OR part from the equation and just use one cell (e.g. B9 =
blank)

=IF(B9>0,"PBR","PBO") then the result is PBO

Why doesn't it work with the OR and blank cells?

Hi,

It looks like your function will work if you move your parentheses a
little on the OR expression:

=IF(OR(B9,B10,B11,B12>0),"PBR","PBO")

Regards,
Bondi
 
=IF(OR(--B9,--B10,--B11,--B12,"PBR","PBO")
will return PBO if any of B2:B12 <> 0 or BLANK

HTH
 
Back
Top