+ Reply to Thread
Results 1 to 12 of 12

Index Match with multiple results

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Index Match with multiple results

    I am having trouble with this formula: =index(sheet1!B1:B30, match(sheet2!D1,sheet1!A1:A30,0)), this works great but I have multiple results that I would like to be listed in separate rows. My question is if say there are two or more rows that say boy or girl but column 2 has a different number is there a way to get each one to list in different rows. So say:
    COL 1 COL 2
    Row 1: Boy 100
    Row 2: Girl 200
    Row 3: Dog 300
    Row 4: Cat 400
    Row 5: Boy 200
    Row 6: Girl 400

    With the original formula in "F1" and have the multiples display in say "F2", "F3", "F4"..., without getting duplicates? I hope this makes sense, thank you very much if you any way help with this!

    Previous forum that I got the original formula from.
    http://www.excelforum.com/excel-form...e-options.html

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,366

    Re: Index Match with multiple results

    You mean like this?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index Match with multiple results

    *I cannot seem to download an attachment to give you this spreadsheet? Sorry I am new to this but I do not see the paperclip to attach anything?*
    I am using the sheet "Receipt" and columns 17-31 for the information needed. I am getting the information from "Sale Sheet", but as you can see I have multiple lot #'s in column A being bought by the same buyer # in column D. I need to figure out how to get all the Lot #'s bought by say buyer # 101 so show up on my rows 17-31 on the "Receipt" sheet. Hope this explains better!

  4. #4
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index Match with multiple results

    Index.xlsx
    Attachment I was talking about on previous post.
    Hope this works!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Index Match with multiple results

    1st, unmerge those cells and remove unneeded columns. Then try this ARRAY formula in B17, copied down and (carefully) across...

    =IFERROR(INDEX('Sale Sheet'!A$2:A$19,SMALL(IF('Sale Sheet'!$D$2:$D$19=$C$11,ROW($A$1:$A$18)-ROW($A$1)+1),ROWS($A$1:A1))),"")

    ...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 your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index Match with multiple results

    Thank you very much it worked perfectly, I really appreciate you spending the time to help me figure this out!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Index Match with multiple results

    Happy to help and thanks for the feedback

  8. #8
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index Match with multiple results

    Index.xlsx
    As I started playing with this formula more I am having a few issues that I cannot seem to fix. Sorry some of this is getting way over my head! But when I put more items in on "Sale Sheet" down to row 69 when I try putting a buyer # in C11 now nothing comes up. I did change the formula a little to be =IFERROR(INDEX('Sale Sheet'!$A$2:$A$69,SMALL(IF('Sale Sheet'!$D$2:$D$69=$C$11,ROW($A$1:$A$18)-ROW($A$1)+1),ROWS($A$1:A1))),""). Because I needed it to go all the way to row 69, did I mess something up by doing that I attached a new worksheet to see if someone can figure out what I need to change.

    Thank you so much for all the help!
    Attached Files Attached Files

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Index Match with multiple results

    wow great job, you were really close You just left out adjusting the last part - understandable as it starts in row 1 and ends in row 18, doesnt quite look the same...

    =IFERROR(INDEX('Sale Sheet'!$A$2:$A$69,SMALL(IF('Sale Sheet'!$D$2:$D$69=$C$11,ROW($A$1:$A$68)-ROW($A$1)+1),ROWS($A$1:A1))),"")
    Again ARRAY entered.

    If you intend extending that table more, a quick way to do that so you dont need to mess with the formulas, is to add rows just abobve the last row - the formula will adjust itself

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

    Re: Index Match with multiple results

    If you index the entire column then you don't have to mess with an offset correction.

    =IFERROR(INDEX('Sale Sheet'!$A:$A,SMALL(IF('Sale Sheet'!$D$2:$D$69=$C$11,ROW('Sale Sheet'!$D$2:$D$69)),ROWS($A$1:A1))),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  11. #11
    Registered User
    Join Date
    04-09-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index Match with multiple results

    They both worked great thank you very much for your hard work to help me on this I really do appreciate it!!!

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

    Re: Index Match with multiple results

    You're welcome. We appreciate the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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] Index, Match, Multiple Results
    By ecorf in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-28-2013, 11:37 AM
  2. Index/Match with multiple results
    By kwadjo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-26-2013, 04:05 PM
  3. Index/Match with multiple results
    By amcghee1 in forum Excel General
    Replies: 4
    Last Post: 10-18-2012, 12:15 PM
  4. Need help with Index + Match Multiple Results
    By xenohadden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2012, 05:00 PM
  5. Index and Match and multiple results
    By mike2bf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2008, 04:10 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