+ Reply to Thread
Results 1 to 6 of 6

IF & OR functions

  1. #1
    ivory_kitten
    Guest

    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(B9>0,"PBR","PBO") then the result is PBO

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

  2. #2
    Bondi
    Guest

    Re: 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(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


  3. #3
    Ardus Petus
    Guest

    Re: 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" <[email protected]> a écrit dans le
    message de news: [email protected]...
    >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?




  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    if all you want is the maximum value of b9:b12>0

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

    Regards

    Dav

  5. #5
    ivory_kitten
    Guest

    Re: 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:b12>0
    >
    > =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
    >
    >


  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,786
    Assuming you won't have any negative values....

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1