+ Reply to Thread
Results 1 to 8 of 8

Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

  1. #1
    Registered User
    Join Date
    03-29-2017
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    9

    Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    First I apologize if this is a double post, I did search first but didn't see an answer.

    I am making up a simple inventory tracker for my warehouse and I have the ability to type in a product number in lets say B2 and it will check my Warehouse page and output 9 columns of information on A5-I5. I want to do this same thing but for when I search for a customer, in this case i might have 5 or more rows of this info, and this is proving to be difficult for me. I think VLOOKUP is out because I'm not searching for the leftmost column and to my understanding you have to for VLOOKUP. I just found out about INDEX MATCH today which seems promising but not sure how to get that to work for this application. VBA was suggested to me but at the moment is a bit beyond my knowledge and was wondering if you guys had any suggestions on new formulas I might be able to try or if i do need VBA, any direction you can give when going that route would be great.

    Info about my excel sheet:

    Page data is currently stored: "Warehouse"
    Cells where Data is: B3:J25 (This will be growing downwards but columns should remain the same)
    Customer names are in column C which is 2nd column of table
    Page data will be requested: "Part Lookup"
    Request & Return cells: Enter Customer name in B2, output results A5:I5 and below

    I think thats everything relevant if you need more info let me know!

    If anyone could help it would be greatly appreciated! Thanks in advance to you all!
    Allan

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Hello aglasier. Welcome to the forum.

    From the description this should work. Enter into the first cell of the desired output range, fill down and across until you get blanks.

    =IFERROR(INDEX(B$3:B$100,MATCH($B$2,$C$3:$C$100,0)),"")

    The MATCH part will return a row number from the customer column (C) that corresponds to the location of B2. It passes that to B$3:B$100 and then to columns C, D, E etc. as you copy across.

    If your data extends beyond row 100 increase the ranges of INDEX and MATCH.
    Dave

  3. #3
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Welcome to the board! From what you've described, VBA should not be necessary. I'm not clear on whether you expect one return or multiple matches. From my reading of your post, it seemed like you might need to do a lookup that may return multiple matches. For one match, FlameRetired's answer has you covered. If you need multiple matches condensed together, see the attachment for an alternative. I've used the following formula, array-entered (confirm with Ctrl + Shift + Enter instead of Enter) in A5:

    =IFERROR(INDEX(Warehouse!$B$3:$J$25,SMALL(IF(Warehouse!$C$3:$C$25=$B$2,ROW(Warehouse!$C$3:$C$25)),ROW(1:1))-2,COLUMN(A:A)),"")

    Then fill right through I5 and fill down beyond what you think you'll need. It should automatically update as you change the search term in B2 or make alterations in your warehouse sheet. If you expect to exceed row 25 on the warehouse sheet, just change all of the $25s in the formula to something more suitable.
    Attached Files Attached Files
    Last edited by CAntosh; 03-29-2017 at 05:20 PM.

  4. #4
    Registered User
    Join Date
    03-29-2017
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Thank you guys for such a quick response! I gave it overnight thinking it would take a while but it was only an hour and a half!! Also thank you for the warm welcome I hope to learn lots from everybody here!

    I have tried your formula, and it works fine on your book i downloaded but for some reason it halfway works for me. When i type in a customer name it will show all of the parts related to that customer, but the problem i'm having is all columns are showing the part number.

    I'll attach a couple screenshots

    Capture.JPG
    Capture2.JPG

  5. #5
    Registered User
    Join Date
    03-29-2017
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Nevermind I just pasted it wrong, i highlighted the whole row i needed, pasted then ctrl+shift+enter but that made the whole row to have "COLUMN(A:A)" now that i pasted it in the first cell and dragged it over all is well!!

    Thank you guys so much for your help! Its nice to find a solution without having to resort to VBA. I do have another question though that probably will need VBA but its unrelated so i'll put up another post for it.

    Thanks again!

  6. #6
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Glad to help, good luck!

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Echo CAntosh.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    03-29-2017
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Returning Multiple Rows of Data (VLOOKUP/INDEX MATCH)

    Will do, and jut noticed I can add some rep to you guys as well!

    Thanks again

+ 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. Returning multiple distinct/repeating values for vlookup or index-match
    By amatvien in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-21-2018, 01:14 PM
  2. Replies: 3
    Last Post: 02-28-2016, 02:56 PM
  3. Index/Match or VLookup returning Multiple Results
    By Stoppeh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2014, 08:31 PM
  4. VLookup or Index/match searching rows instead of columns or multiple criteria
    By Groovicles in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-16-2013, 05:00 PM
  5. Replies: 0
    Last Post: 05-15-2013, 05:05 AM
  6. [SOLVED] VLOOKUP (or Index/Match) across four columns -- and returning multiple matches
    By rcasey in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 05:20 PM
  7. Vlookup and Index/Match problem with multiple rows
    By excelismyfriend in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-01-2009, 12:25 PM

Tags for this Thread

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