+ Reply to Thread
Results 1 to 7 of 7

Find multiple results with INDEX & MATCH on 2 criteria

  1. #1
    Forum Contributor
    Join Date
    08-21-2011
    Location
    Australia, Perth
    MS-Off Ver
    Excel 2010
    Posts
    159

    Find multiple results with INDEX & MATCH on 2 criteria

    Hi all,

    I think I'm pushing it with this one but thought I'd ask in case there is some very clever cookie in here.

    I have an index & match based on two criteria which is working fine:

    Please Login or Register  to view this content.
    The problem is that there may be multiple instances with different results, so I would like to have the ability to look for and return the 1st result, 2nd, 3rd etc, knowing that sometimes only one result is available. I found the following formula on another website but can't figure out for the life of me how to combine the two:

    Please Login or Register  to view this content.
    Thanks in advance to anyone who has a suggestion.
    IM

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Contributor
    Join Date
    08-21-2011
    Location
    Australia, Perth
    MS-Off Ver
    Excel 2010
    Posts
    159

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    Thanks for the suggestion John and apologies for not doing it before.

    So in my workbook I have the following:
    . WBK 1 - Raw Data: separate workbook which will store the data that I look into. Currenty contains ~2000 lines and will continue to grow over time
    . WBK 2 - Before: format of the workbook that will contain the macro where I would like to input data
    . WBK 2 - After (current): data is being imported with a Index & match based on two match criteria (X-number & "Released") however it only returns one date
    . WBK 2 - After (ideal): the way I would like data to be imported, where it would return (when available) the 1st, 2nd, 3rd, etc result down the list.

    Thanks in advance to anyone who can help.
    IM
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    The results do not tally with the data: assuming "OP Start Date"="Schedule start date" then they do not match in all cases.

    Use consistent terminology: Either "OP" or "Schedule" (assuming the same).

    Item/Req/PO= Asset number (minus the "X-") ? ... this always the case?

    Try

    BUT data needs to be sorted by "Asset Number" if you require the sequence 1 to n.

    In "AFTER (Ideal")

    in B5

    =IFERROR(INDEX(RIGHT('WBK 1 - Raw Data'!$A$4:$A$100,9),SMALL(IF(('WBK 1 - Raw Data'!$G$4:$G$100="Released")*(SMALL('WBK 1 - Raw Data'!$E$4:$E$110,ROW($A$2:A2))),ROW('WBK 1 - Raw Data'!$A$4:$A$100)-ROW($A$4)+1,""),ROWS($A$4:A4))),"")

    in C5

    =IFERROR(INDEX('WBK 1 - Raw Data'!$E$4:$E$100,SMALL(IF('WBK 1 - Raw Data'!$G$4:$G$100="Released",ROW('WBK 1 - Raw Data'!$A$4:$A$100)-ROW($A$4)+1,""),ROWS($A$4:B4))),"")

    in D5

    =COUNTIF($B$5:B5,B5)

    In E5


    =IFERROR(INDEX('WBK 1 - Raw Data'!$F$4:$F$100,SMALL(IF('WBK 1 - Raw Data'!$G$4:$G$100="Released",ROW('WBK 1 - Raw Data'!$A$4:$A$100)-ROW($A$4)+1,""),ROWS($A$4:B4))),"")
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-21-2011
    Location
    Australia, Perth
    MS-Off Ver
    Excel 2010
    Posts
    159

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    Hi John,

    My apologies, I am so familiar with the terminology that I didn't realize I wasn't consistent across the sheets.

    I have reattached the file with correct headings. I need to clarify two things:

    . I only need formulas in the colored cells
    . I can't sort WBK 1 - Raw Data by Asset Number as I don't own the file and it is extracted from Oracle via a DB Query. It is sorted by "Sched Start Date" in column E, which is not needed for anything and does not link to "Op Start Date" in column C of WBK 2.

    I hope this clarifies what I am facing

    Thanks,
    IM
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    Try

    =IFERROR(INDEX('WBK 1 - Raw Data'!$F$4:$F$11,SMALL(IF(('WBK 1 - Raw Data'!$A$4:$A$11="X-" &$B5)*('WBK 1 - Raw Data'!$G$4:$G$11="Released"),ROW('WBK 1 - Raw Data'!$A$4:$A$11)-ROW($A$4)+1,""),$D5)),"")

    It uses the sequence number in column D to find the correct value

  7. #7
    Forum Contributor
    Join Date
    08-21-2011
    Location
    Australia, Perth
    MS-Off Ver
    Excel 2010
    Posts
    159

    Re: Find multiple results with INDEX & MATCH on 2 criteria

    This is brilliant, thank you It works perfectly.

+ 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. Index and match formula, attempting to return results with multiple criteria.
    By mahalek1976 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-02-2017, 12:43 AM
  2. [SOLVED] Index match on multiple criteria/ results
    By Burt_100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-06-2015, 10:40 AM
  3. [SOLVED] Index Match with multiple criteria involving find text
    By 3345james in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-30-2015, 11:56 AM
  4. Index / Match with 2 Criteria showing all results
    By corhrtz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-28-2014, 05:56 PM
  5. [SOLVED] How to index and match multiple criteria without repeating results?
    By PistachioPedro in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-20-2013, 05:38 PM
  6. Replies: 0
    Last Post: 03-02-2012, 11:16 AM
  7. Replies: 3
    Last Post: 07-11-2009, 02:58 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