+ Reply to Thread
Results 1 to 6 of 6

Combining two AND functions into an OR function

  1. #1
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    Combining two AND functions into an OR function

    Hi everyone!

    So here's what I got:

    =IF(ISNUMBER(SEARCH("U",$G3)),IF(AND(S$2>=$H3,S$2<$I3),"x",""),"")
    =IF(ISNUMBER(SEARCH("U",$J3)),IF(AND(S$2>=$K3,S$2<$L3),"x",""),"")

    I'm currently using these two IF functions and I want to combine then into one formula that make it so if one of these two conditions is true it puts an x in the cell. I've been messing with this for hours and can't seem to get it to work!

    Eventually I would like to use three of these functions. Unfortunately I'm very new to this and am struggling to figure it out. Thanks for any help.

    edit: To be more clear it's the text in green that i want to be OR'd to give the result of:
    If one is true "x"
    If false " "
    Attached Files Attached Files
    Last edited by tbarnes22; 02-13-2012 at 06:45 PM.

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

    Re: Combining two AND functions into an OR function

    How about?

    =IF(OR(AND(ISNUMBER(SEARCH("U",$G3)),S$2>=$H3,S$2<$I3),AND(ISNUMBER(SEARCH("U",$J3)),S$2>=$K3,S$2<$L3)),"x","")
    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.

  3. #3
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Combining two AND functions into an OR function

    !! Thanks for the help! This is great!

    I'm having one small issue with the formula though. I am using this new formula and now certain times are being pushed forward by a half an hour from how I had it in the formulas I gave. I don't see what changed in this new formula that would be causing this.

    Disregard..

    Thanks so much! I wish i could hug you right now!
    Last edited by tbarnes22; 02-13-2012 at 02:43 PM.

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

    Re: Combining two AND functions into an OR function

    The formula checks if either of these combinations of 3 criteria are TRUE or FALES

    ISNUMBER(SEARCH("U",$G3)),S$2>=$H3,S$2<$I3

    ISNUMBER(SEARCH("U",$J3)),S$2>=$K3,S$2<$L3

    if either combination is true, then "x" is returned, else a blank.

    Is that the correct logic?

  5. #5
    Registered User
    Join Date
    02-10-2012
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Combining two AND functions into an OR function

    Yup that's exactly what I'm going for. I'm still having a problem where it's pushing some back by 30 minutes, but i believe that may be an error on my end.

    I have edited my original post with an attachment so you can see what I'm talking about.

    If you look at the classes on Monday, they are all a half an hour pushed back than I want them to be.

    I once again appreciate your help! Ty.
    Last edited by tbarnes22; 02-13-2012 at 03:15 PM.

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

    Re: Combining two AND functions into an OR function

    When comparing times, sometimes there are precision issues, based on how the times were achieved in the cells.... I usually round to 6 decimals to get accuracy...

    so, for example, in BO3 for "M" try:

    Please Login or Register  to view this content.

+ 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