+ Reply to Thread
Results 1 to 9 of 9

Trouble with Index Match multiple criteria

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Trouble with Index Match multiple criteria

    hi everyone,

    I have the following formula:

    =INDEX('Feb 2014'!E3:E500,MATCH('Answer Analysis'!B3,'Feb 2014'!B3:B500)*('Answer Analysis'!D3,'Feb 2014'!D3:D500),0)

    So i'm trying to return the results from Feb 2014 column E if the value in B2 is matched with the Feb 2014 B column value and D2 is matched wih the Feb 2014 D column value. I'm entering Ctrl+Shift+Enter as well. I'm getting a #value error. What am I doing wrong?

    The end results is that I'll need to add the formula about 4 times (for 4 different months)

    Thanks!
    Last edited by Groovicles; 06-26-2014 at 11:55 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Trouble with Index Match multiple criteria

    Hi,

    Not entirely sure what you expect (D2,'Feb 2014'!D2:D500) to evaluate to but at the moment it will be an error.
    Neither am I sure what the Match(B2.... is doing since if B2 is also on the Feb 2014 sheet that bit will always result in the value 1, since B2 will always be found in the first row of B2:B500.

    Upload your workbook and manually add the results you expect to see explaining clearly how you have calculated them
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Trouble with Index Match multiple criteria

    I'm actually working with two different speadsheets. Perhaps this will be make sense:

    =INDEX('Feb 2014'!E3:E500,MATCH('Answer Analysis'!B3,'Feb 2014'!B3:B500)*('Answer Analysis'!D3,'Feb 2014'!D3:D500),0)

    So the for this formula should show up on 'Answer Analysis'!E3

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Trouble with Index Match multiple criteria

    Sorry, but out of context that doesn't mean a lot.

    Please upload the workbook with manually calculated results as requested.

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Trouble with Index Match multiple criteria

    =INDEX('Feb 2014'!E3:E500,MATCH(1,('Answer Analysis'!B3='Feb 2014'!B3:B500)*('Answer Analysis'!D3='Feb 2014'!D3:D500),0))

    Could it be this that you were trying to achieve? Note the added 1,( and the parethesis in the end.
    An array formula ofcourse, you have to enter it with Ctrl + Shift + Enter.

    Also the fixed ranges like E3:E500 should be $E$3:$E$500.
    Last edited by Jacc; 06-28-2014 at 06:14 PM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Trouble with Index Match multiple criteria

    One way...

    Array entered**:

    =INDEX('Feb 2014'!E3:E500,MATCH('Answer Analysis'!B3,IF('Feb 2014'!D3:D500='Answer Analysis'!D3,'Feb 2014'!B3:B500),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Trouble with Index Match multiple criteria

    Right now I can think of three different ways to do the multiple condition lookup:
    MATCH(A1&B1, E1:E100&F1:F100,0)
    MATCH(B1,IF(E1:E100=A1,F1:F100),0)
    MATCH(1,(E1:E100=A1)*(F1:F100=B1),0)

    I haven't tested them all but I'm guessing the top one is the slowest and the bottom one is the fastest. Do you have any input on that, Tony?

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Trouble with Index Match multiple criteria

    Here are the average calculation times (in seconds) for these formulas:

    Formula1: MATCH(A1&B1, E1:E100&F1:F100,0)
    Formula2: MATCH(B1,IF(E1:E100=A1,F1:F100),0)
    Formula3: MATCH(1,(E1:E100=A1)*(F1:F100=B1),0)

    Data Range
    I
    J
    K
    L
    M
    N
    O
    1
    100 rows
    Test1
    Test2
    Test3
    Test4
    Test5
    Average
    2
    Formula1
    0.00029
    0.00029
    0.00029
    0.00032
    0.00029
    0.000296
    3
    Formula2
    0.00017
    0.00017
    0.00017
    0.00017
    0.00017
    0.000170
    4
    Formula3
    0.00017
    0.00017
    0.00017
    0.00017
    0.00017
    0.000170
    5
    6
    7
    1000 rows
    Test1
    Test2
    Test3
    Test4
    Test5
    Average
    8
    Formula1
    0.00864
    0.00863
    0.00761
    0.00861
    0.00866
    0.00843
    9
    Formula2
    0.00044
    0.00044
    0.00046
    0.00045
    0.00044
    0.000446
    10
    Formula3
    0.00052
    0.00052
    0.00054
    0.00052
    0.00053
    0.000526


    Used the timer code found here:

    http://msdn2.microsoft.com/en-us/library/aa730921.aspx

    Your results may vary depending on the configuration of your machine.

    Notice how inefficient the range concatenation formula is on the larger range. Yet, you see many folks doing it that way!
    Last edited by Tony Valko; 06-28-2014 at 08:19 PM.

  9. #9
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Trouble with Index Match multiple criteria

    Good info! Thanks Tony!

+ 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. Help with Index Match & Multiple Criteria
    By sseagroves in forum Excel General
    Replies: 5
    Last Post: 05-23-2014, 11:54 PM
  2. [SOLVED] VBA index match multiple criteria
    By spikerush2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-22-2014, 10:47 AM
  3. VBA Index/Match multiple criteria
    By Sparkplug90 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2014, 08:15 AM
  4. match or index multiple criteria
    By simpson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 02:13 PM
  5. INDEX MATCH MAX with multiple criteria
    By smproud in forum Excel General
    Replies: 2
    Last Post: 05-12-2011, 12:00 PM

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