+ Reply to Thread
Results 1 to 7 of 7

Index/Match with Multiple Criteria and Multiple return values

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    266

    Index/Match with Multiple Criteria and Multiple return values

    See attached workbook. Formula begins in cell F2 on down. Basically, it uses INDEX/MATCH to return a claim number from Group 2 where Group 1 has a date that falls between the Group 2 dates. It works fine to return one value, but, in instances of where I have multiple matching values, how do I return them both? (or even more)?

    Can they be concatenated in the same cell separated by comma, or placed in the next cell over? Either way I am fine with. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Index/Match with Multiple Criteria and Multiple return values

    Using an array formula, it's easy to get them appearring side-by-side. Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    =IFERROR(INDEX($P$2:$P$10, SMALL(IF($C2=$O$2:$O$10, ROW($O$2:$O$10)-MIN(ROW($O$2:$O$10))+1, ""), COLUMN(A1))),"")

    Don't type the curly braces yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    266

    Re: Index/Match with Multiple Criteria and Multiple return values

    Actually, it only matched by ID. Need to also factor in date as well..(e..g Date in cell B2 is greater than or equal to value in $M$2:$M$4, less than or equal to $N$2:$M$4, assuming it matches with the ID).

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Index/Match with Multiple Criteria and Multiple return values

    Misread your post.... I'll take a look later on (away from PC for 5-6 hours.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Index/Match with Multiple Criteria and Multiple return values

    I converted the date formats back from CUSTOM to DATE as this was causing Excel (and me!!) to get confused by the USA habit if using MM-DD-YYYY, whereas everyone else uses DD-MM-YYYY.

    This array formula works as described:

    =IFERROR(INDEX($P$2:$P$13,SMALL(IF(($O$2:$O$13=$C2)*($B2>=$M$2:$M$13)*($B2<=$N$2:$N$13),ROW($O$2:$O$13)),COLUMNS($A:A))-1),"")
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    266

    Re: Index/Match with Multiple Criteria and Multiple return values

    Thanks for your hard work and follow-up!!! I appreciated it..

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Index/Match with Multiple Criteria and Multiple return values

    You're welcome and thanks for the Reputation. Sorry for misreading your post first time round, too.

+ 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] Return Multiple values from a column with index and match, and search criteria
    By marcusduton in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 02-15-2015, 09:59 PM
  2. Replies: 0
    Last Post: 07-08-2014, 09:51 AM
  3. [SOLVED] Two criteria Index Match on multiple sheets returning multiple values
    By Joak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2014, 10:03 AM
  4. SOS:Return multiple values against multi criteria match and index function
    By nitesh_inin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-26-2012, 05:45 PM
  5. Replies: 3
    Last Post: 06-15-2012, 04:19 PM
  6. [SOLVED] Return a value:index/match against multiple criteria on another sheet
    By Southfish in forum Excel General
    Replies: 3
    Last Post: 04-30-2012, 11:08 PM
  7. [SOLVED] How to use Index Match to return multiple values
    By pingpoeng in forum Excel General
    Replies: 2
    Last Post: 04-09-2012, 09: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