ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF & OR functions (https://www.excelbanter.com/excel-worksheet-functions/99266-if-functions.html)

ivory_kitten

IF & OR functions
 
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(B90,"PBR","PBO") then the result is PBO

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

Bondi

IF & OR functions
 

ivory_kitten wrote:
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(B90,"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,B120),"PBR","PBO")

Regards,
Bondi


Ardus Petus

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

HTH
--
AP

"ivory_kitten" a écrit dans le
message de news: ...
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(B90,"PBR","PBO") then the result is PBO

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




Dav

IF & OR functions
 

if all you want is the maximum value of b9:b120

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

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=561378


ivory_kitten

IF & OR functions
 
Thanks guys, I just needed if it is blank or zero.

"Dav" wrote:


if all you want is the maximum value of b9:b120

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

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=561378



daddylonglegs

IF & OR functions
 

Assuming you won't have any negative values....

=IF(SUM(B9:B12),"PBR","PBO")


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=561378



All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com