Results 1 to 6 of 6

Multiple If statements with multiple then statements pulling from Index/Match commands

Threaded View

  1. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,926

    Re: Multiple If statements with multiple then statements pulling from Index/Match commands

    Testing for three criteria requires a 2-level nested if formula:
    =IF(LEFT(E15,1)="V",INDEX('M:\Echart\[EChart 1053 Trim Code Sheet Rev 19.xls]Trim Codes with MCS'!B$3:B$1053,MATCH(I$11,'M:\Echart\[EChart 1053 Trim Code Sheet Rev 19.xls]Trim Codes with MCS'!$A$3:$A$1053,0)),IF(LEFT(E15,1)="N",INDEX('M:\Echart\[EChart 1049 Oracle Trim Code Sheet Nextech.xlsx]Trim code with temps'!B$2:B$215,MATCH(I$11,'M:\Echart\[EChart 1049 Oracle Trim Code Sheet Nextech.xlsx]Trim code with temps'!$A$2:$A$215,0)),INDEX('M:\Echart\[Echart 1048 Trim Code Sheet PSG Rev1.xls]Trim Codes'!B$7:B$16,MATCH(I$11,'M:\Echart\[Echart 1048 Trim Code Sheet PSG Rev1.xls]Trim Codes'!$A$7:$A$16,0))))
    The first IF tests for V, and, if found, the first Index is evaluated. If V is not found, the inner IF tests for N, if N is found, the first Index of the inner IF function is evaluated, if not, then P is assumed and the last Index is evaluated.

    An alternative is the Choose function will branch to a specific Index function based on the position the test code (Left(E15,1)) is found in the lookup array:
    =CHOOSE(MATCH(LEFT(E15,1),{"V","N","P"},0),INDEX('M:\Echart\[EChart 1053 Trim Code Sheet Rev 19.xls]Trim Codes with MCS'!B$3:B$1053,MATCH(I$11,'M:\Echart\[EChart 1053 Trim Code Sheet Rev 19.xls]Trim Codes with MCS'!$A$3:$A$1053,0)),INDEX('M:\Echart\[EChart 1049 Oracle Trim Code Sheet Nextech.xlsx]Trim code with temps'!B$2:B$215,MATCH(I$11,'M:\Echart\[EChart 1049 Oracle Trim Code Sheet Nextech.xlsx]Trim code with temps'!$A$2:$A$215,0)),value3)
    For instance if E15 is N... then Match(E15... returns 2 and Choose evaluates the second Index in the list.
    Last edited by protonLeah; 11-30-2017 at 03:29 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pulling multiple data points from a file using VLookups and If statements
    By JTRiles in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2017, 12:49 PM
  2. Multiple If statements or INDEX MATCH? Im confused.
    By amedinak in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2014, 05:08 AM
  3. Index with multiple IF statements
    By Yves2509 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2013, 01:53 AM
  4. Array formula - index and match with multiple statements
    By A[L]C in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-06-2013, 11:13 AM
  5. Multiple IF statements using an INDEX
    By AmandaJC77 in forum Excel General
    Replies: 0
    Last Post: 08-30-2011, 03:18 PM
  6. Using INDEX/MATCH With Multiple IF Statements
    By doraen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2011, 04:10 PM
  7. Replies: 12
    Last Post: 05-15-2009, 08:38 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