Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Either/Or (2000)

    An easy One: I am trying to come up with the correct "Either/Or" formula language such that if either one or two conditions are met, say, either A1>0 or B1>0, then C1=1, else C1=0. Any takers?
    Thanks,
    Jeff

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Either/Or (2000)

    In C1 enter:

    =if(or(a1>0,B1>0),1,0)

    Steve

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Either/Or (2000)

    Thanks, Steve.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Either/Or (2000)

    If you want the "standard" OR, that is, you want C1 to be 1 if A1>0 or B1>0 or both, use
    =IF(AND(ISNUMBER(A1),ISNUMBER(B1),OR(A1>0,B1>0)),1 ,0)
    If you want an "exclusive" OR, that is, you want C1 to be 1 if A1>0 or B1>0, but not if both are >0, then use
    =IF(AND(ISNUMBER(A1),ISNUMBER(B1),OR(A1>0,B1>0),NO T(AND(A1>0,B1>0))),1,0)
    Note: the ISNUMBER parts are included to prevent a result of 1 if A1 or B1 is empty.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Either/Or (2000)

    Thanks, Hans, I hadn't thought/anticipated/contemplated the "exclusive" condition.

Posting Permissions

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