+ Reply to Thread
Results 1 to 7 of 7

Formula to Pull Multiple Results from Column Matching Same Criteria

  1. #1
    Registered User
    Join Date
    02-04-2019
    Location
    Jacksonville, Florida
    MS-Off Ver
    EXCEL 2016
    Posts
    3

    Formula to Pull Multiple Results from Column Matching Same Criteria

    Hello All,

    I have an Excel file that contains Data about shipments imported from SAP via a report pulled. The data can constantly change for every column/ row any second of the day. This report is run each day, dumped into excel on a sheet, and then pulled via Index Match formula to the main sheet/template.

    My problem that no one can seem to find a solution to, is that the lookup value (shipment #) can have multiple different materials shipping on that same shipment (with the same lookup value) and in the same column (same lookup array). The lookup will only pull the first material number it sees in the column. I have no other unique identifiers to pull each material number using a multiple lookup.

    My question is, Is there any way to create a unique identifier between different sheets? I'm currently trying to look up the shipment number on the main sheet and the material number on the second sheet where it is correct (imported from the report). Here is the current formula I'm trying to run and the result is N/A

    =INDEX{(LOR!G:G,MATCH(Data!G2&LOR!G:G,Data!G:G&LOR!G:G,0))}

    (I've seen some methods where Excel will show you each row that the material is in using an (IF,SMALL,ROW) function but that is time consuming and would not work in my situation. I'm looking for the least manual method possible.)

    This is my first post so please let me know if you need more info, etc. Thank you and sorry for the length of the post.
    Attached Files Attached Files
    Last edited by rfowl0106; 02-04-2019 at 02:53 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Calling all GURU's to help fix a potential task Excel cannot do (INDEX MATCH)

    Welcome to the forum!

    Your thread title is really not good. I will amend it for you this time, as you are a new member, but in future you must ensure that your titles explain what you are trying to do.

    Please attach a workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Formula to Pull Multiple Results from Column Matching Same Criteria

    What happens with Match and Vlookup is that once they find what they are looking for, they stop looking. Only the first value that matches is returned.

    There are two ways to handle this. One way is to make a composite key of what makes a record unique. In this case, it appears to be the SO#, DEL#, Shipment and Material. Then you can do the lookup on the composite. I put a "helper column" in the Data From Report to show you what that might look like. You would have to make an identical composite key on the sheet where you are doing the lookup.

    I did not go through with this. Instead, I used a pivot table.

    First I converted the data from report to an Excel Table. Excel tables have a number of benefits: they "know" how big they are so pivot tables, formulas and charts that reference them do not have to be changed when rows are added or deleted. Also they "remember" formulas and copy them down automatically, so if you have formulas in helper columns, you don't have to worry about them.

    So in the example shown here, you could delete the table rows (not the header) and copy in the next day's data. The helper column formula is filled in automatically for all rows.

    On the pivot table sheet, all you have to do is right click in it and select refresh.

    The two selection panels are called slicers. It is worth looking them up. They are nice-looking filters but are more powerful than that. Best of all, they are very easy to implement.

    Here is a quick blurb on tables: http://www.utteraccess.com/wiki/Tables_in_Excel

    I do not have a good reference for pivot tables, I learned them so long ago that even if the reference still existed it would probably be obsolete.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Formula to Pull Multiple Results from Column Matching Same Criteria

    P.S, you do not need the helper column if you use the pivot table. I only included it to show an alternative method of lookup. Some times pivot tables worn't work for what you want when you want to do a lookup with multiple criteria. Composite keys can be the answer.

  5. #5
    Registered User
    Join Date
    02-04-2019
    Location
    Jacksonville, Florida
    MS-Off Ver
    EXCEL 2016
    Posts
    3

    Re: Formula to Pull Multiple Results from Column Matching Same Criteria

    Your composite key I think can really help me. Is there an easy shortcut to get that formula? =a4&B4&C4 or is it something else? Thanks a ton!

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Formula to Pull Multiple Results from Column Matching Same Criteria

    Yes, that is exactly what I did. I usually stick some kind of delimiter between he pieces (in this case a colon) which makes it a bit easier for people to read.

  7. #7
    Registered User
    Join Date
    02-04-2019
    Location
    Jacksonville, Florida
    MS-Off Ver
    EXCEL 2016
    Posts
    3

    Re: Formula to Pull Multiple Results from Column Matching Same Criteria

    Thanks so much for your help! I was able to figure it out. It took me a bit to understand but i've got it now. For anyone else that is having this same problem. First I had to make each sheet filtered exactly the same and be sure there were no deviations from any rows by pulling a column from each sheet and matching them to be sure they are the same. Then I made the unique composite key off of the correct sheet with all the correct information. Then paste the values of the composite key to the sheet you are trying to pull the information into. After this, your lookup value is the composite key and you can either do an Idex-match or a v lookup.

    Thanks again for all the help!

+ 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 with multiple criteria with additional task-Please help.
    By farniajr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-23-2018, 03:43 AM
  2. Return Multiple Match Values in Excel Using INDEX-MATCH
    By chris1089 in forum Excel General
    Replies: 10
    Last Post: 06-15-2017, 09:25 AM
  3. VBA Code for Index/Match/Match to input into excel based on 2 criteria inside form
    By Carl Fisher in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2017, 12:11 PM
  4. export excel list of task in custom outlook task 2010.
    By maxseal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2014, 03:51 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Using Index And Match To Return Potential Multiple Results To One Cell
    By jcaynes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2013, 10:41 AM
  7. Calling all Excel Guru's Help!!!
    By matt shepherd in forum Excel General
    Replies: 5
    Last Post: 06-28-2005, 12:05 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