+ Reply to Thread
Results 1 to 2 of 2

Combining IF Statements

  1. #1
    Forum Contributor
    Join Date
    03-26-2014
    Location
    Kentucky
    MS-Off Ver
    Excel 2013
    Posts
    128

    Combining IF Statements

    How would I combine these 4 IF statements into one?

    =IF(A2="A",IF(ISNUMBER(MATCH("B",$A$2:$A$21,0)),"B",A2),A2)
    =IF(B2="D",IF(ISNUMBER(MATCH("E",$A$2:$A$21,0)),"E",B2),B2)
    =IF(C2="L",IF(ISNUMBER(MATCH("O",$A$2:$A$21,0)),"O",C2),C2)
    =IF(D2="F",IF(ISNUMBER(MATCH("K",$A$2:$A$21,0)),"K",D2),D2)

    Any help would be greatly appreciated

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Combining IF Statements

    Depends on how you need to combine. The first conditions in each formula are not mutually exclusive conditions. For example, what do you want to return if A2="A" and the MATCH returns a number, and also B2="D" and that MATCH returns a number? In the extreme case, what if all eight conditions are TRUE? What if all eight conditions are FALSE?

    If you can sort out the order of precedence to evaluate the conditions, then the formula practically writes itself.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Combining if with and statements
    By npjones1812 in forum Excel General
    Replies: 2
    Last Post: 03-20-2014, 05:16 PM
  2. [SOLVED] Combining IF Statements
    By Bob Lankin in forum Excel General
    Replies: 5
    Last Post: 10-05-2013, 04:50 PM
  3. Combining Two IF Statements
    By PERE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2013, 09:07 PM
  4. combining two if statements to one
    By excel_help_needed in forum Excel General
    Replies: 7
    Last Post: 10-28-2010, 07:04 AM
  5. Help combining IF statements
    By Excel-erate2004 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2007, 11:32 AM

Tags for this Thread

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