+ Reply to Thread
Results 1 to 9 of 9

Combine 2 IF OR statements

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Combine 2 IF OR statements

    I'm not sure if this is possible of if it's just that I can't seem to wrap my brain around what is wrong with the way I'm trying to write a formula.
    1. =IF(OR(F2=D2,F2=E2),"APPLE"," ") - works fine
    2. =IF(OR(G2=D2,G2=E2),"ORANGE","") - works fine

    Is it possible to combine the two? Right now Column H has formula 1 and Column I has formula 2 but ideally if I could just put a formula in Column H that would give me results of either 1 or 2, that would be great.

    - Wheelie686

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Combine 2 IF OR statements

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  3. #3
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Combine 2 IF OR statements

    Thanks for the quick reply BadlySpelledBuoy. I wrote a little too quickly myself. I actually have 3 formulas across 3 columns. The 3rd basically tells me if I both results are true.
    1. =IF(OR(F2=D2,F2=E2),"APPLE"," ") - works fine
    2. =IF(OR(G2=D2,G2=E2),"ORANGE","") - works fine
    3. =IF(AND(OR(F2=D2,E2),G2=D2,E2),"Y","") - works fine

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Combine 2 IF OR statements

    If you want to combine all three then this would work. Note formula 3 is the first one as you need that to fire before the other two.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Without the context of your workbook I'm not really sure what you're trying to do with formula 3.

    BSB

  5. #5
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Combine 2 IF OR statements

    Does this help explain what I'm trying to accomplish? I explained columns H,I,J but in reality, I want to combine them all into what would be column K
    Attached Files Attached Files

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Combine 2 IF OR statements

    Does this do what you need?
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  7. #7
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Combine 2 IF OR statements

    No the "Both" argument is definitely resulting in "Fast" no matter what.
    You also referenced H2 but column H shouldn't be referenced. Column H won't really exist because I'm trying to eliminate/combine H,I,J. When I get that to work, it'll actually replace H and nothing else will exist after H.
    Last edited by Wheelie686; 08-20-2017 at 06:22 PM.

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Combine 2 IF OR statements

    Formula for K2

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  9. #9
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Combine 2 IF OR statements

    That did the trick! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] how can i combine these two IF statements into one
    By dmcgov in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2017, 02:50 PM
  2. [SOLVED] Combine 2 if statements
    By cartica in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-15-2014, 10:08 AM
  3. Four IF statements to combine
    By ABSTRAKTUS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2014, 03:43 PM
  4. Can I combine 3 IF statements into one?
    By Mike7591 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-24-2013, 11:58 AM
  5. Need to combine several IF statements together
    By SumTuck in forum Excel General
    Replies: 7
    Last Post: 06-12-2012, 12:25 PM
  6. Combine 2 If statements
    By m1066189 in forum Excel General
    Replies: 2
    Last Post: 06-23-2010, 07:58 PM
  7. How to combine two IF statements together.
    By foad in forum Excel General
    Replies: 7
    Last Post: 03-13-2009, 05:06 AM

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