+ Reply to Thread
Results 1 to 13 of 13

multiple Or???

  1. #1
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Red face multiple Or???

    A B D E F G H
    1 5 0 13 15
    2 0 11 15 18 14 7


    H2=IF(OR(F2=0,F2="ERROR",OR(A2<A1,D2<D1)),0,(F2/G2)). Answer should be 2. Please help.

    I'm having issues with "OR(A5<A4,D5<D4)". I know I'm not doing this right, but basically, I'd like the condition to also include that even if A5<A4, but not necessary D5<D4 or vice versa, I'd still like F2/G2.
    Last edited by Maddyv; 10-26-2009 at 01:01 PM.

  2. #2
    Registered User
    Join Date
    10-16-2009
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: multiple Or???

    Leave the second "OR" out. The format is =OR(variable1, variable2, variable3, etc...)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: multiple Or???

    Maybe...

    =IF(OR(F2=0,F2="ERROR"),0,IF(OR(A2<A1,D2<D1)),(F2/G2),0)).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Question Re: multiple Or???

    =IF(OR(F2=0,F2="ERROR"),0,IF(OR(A2<A1,D2<D1)),(F2/G2),0))


    What am I doing wrong? It's not working for me

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: multiple Or???

    Sorry, this time my fault.. too many brackets closing

    =IF(OR(F2=0,F2="ERROR"),0,IF(OR(A2<A1,D2<D1),(F2/G2),0))

  6. #6
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Re: multiple Or???

    '=IF(OR(F2=0,F2="ERROR"),0,IF(OR(A2<A1,D2<D1),(F2/G2),0))


    It's coming back as '0', rather than a '2'.....now what???? :-(

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: multiple Or???

    This equation should bring back a zero if any of the following condtions are true;
    1. F2 = Error
    2. F2 = 0
    3. A2 >= A1 And D2>=D1

    So you are saying that none of these conditions are met but it's still giving 0?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: multiple Or???

    This:

    =IF(AND(ISNUMBER(F2);A2>A1;D2>D1);F2/G2;0)

  9. #9
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Re: multiple Or???

    ChemistB:

    1) F2=Error
    2) F2<= 0

    Then I want "0" return. But, if F2 is not a "0" but A2<A1 and D2<D1, could be just A2<A1 or just D2<D1 or neither, then I want F2/G2. In this case, the answer I'm hoping for is "2" which is 14/7.

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: multiple Or???

    Quote Originally Posted by Maddyv View Post
    ChemistB:

    1) F2=Error
    2) F2<= 0

    Then I want "0" return. But, if F2 is not a "0" but A2<A1 and D2<D1, could be just A2<A1 or just D2<D1 or neither, then I want F2/G2. In this case, the answer I'm hoping for is "2" which is 14/7.
    You sounds inconsistent to me: you said:

    if F2 is not a "0" but A2<A1 and D2<D1

    and on another place:


    A2<A1 or just D2<D1

    Can you write in table several examples and state for wich it's working for wich it don't.

    Write different cases (A2<A1, A2>A1, A2=A1.. same for D1, D2...)

  11. #11
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Re: multiple Or???

    It's actually and/or....as in BOTH could be < than the cell above or just one of them or neither of them? Does that make sense....if not, I'll attempt to rewrite as you requested...

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: multiple Or???

    There's no AND/OR. If that's case only OR is enough because OR contains AND.

  13. #13
    Registered User
    Join Date
    12-12-2008
    Location
    Tahoe
    Posts
    21

    Re: multiple Or???

    =IF(OR(F2=0,F2="ERROR"),0,IF(OR(A2<A1,D2<D1),(F2/G2),0))

    So how can I use the above formula with a return of 2, rather than 0?

+ 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