IF & OR functions

I

ivory_kitten

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?
 
B

Bondi

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
 
A

Ardus Petus

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

HTH
 
D

Dav

if all you want is the maximum value of b9:b12>0

=if(max(b9:b12)>0,"PBR","PBO")

Regards

Dav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top