+ Reply to Thread
Results 1 to 5 of 5

Lookup/Match with multiple results, removing duplicates

  1. #1
    Registered User
    Join Date
    11-20-2017
    Location
    Delaware
    MS-Off Ver
    2010
    Posts
    3

    Lookup/Match with multiple results, removing duplicates

    Hello!

    I am trying to create a formula to search the value in a static cell, searching a column in another sheet for a match and returning the value in the adjacent cell to the match on the same sheet. The matches will have duplicates, which I want to remove so that I end up with a list of values in my table. I have made many attempts, all of which have failed at some step, any help would be such a relief!

    I have been able to use this formula to return the first result (but copying down returns the same exact result instead of pulling the next result and so forth):
    =IF(COUNTIF(Gallons!$C:$C,$B$2)>=ROWS($K6:K25),INDEX(Gallons!$B:$B,MATCH($B$2,Gallons!$C:$C,0)+ROWS($K6:K25)*0),"")

    I have also found the following website which seems to detail my exact situation, but the result I get from the formula I have modified results in a blank:
    Website: http://eimagine.com/how-to-return-mu...ch-or-vlookup/
    The formula I have modified: =IF(ISERROR(INDEX(Gallons!$B:$C,SMALL(IF(Gallons!$C:$C='Market Tour Report'!$K$5,ROW(Gallons!$C:$C)),ROW(5:5)),2)),"",INDEX(Gallons!$B:$C,SMALL(IF(Gallons!$C:$C='Market Tour Report'!$K$5,ROW(Gallons!$C:$C)),ROW(5:5)),2))

    Sheet 1 ("market tour report") where the table I am trying to populate is:
    lookup value (K5)
    formula cell 1
    formula cell 2 (on down for a total of 20 cells)

    Example of Sheet 2 ("Gallons") where data is being retrieved (column B & C):
    Data to report back (gallons B) /Data to match to lookup value (Gallons c)
    report back if C2=K5 /if matches lookup report back B2
    more return values (to ~70,000) /more match values (to ~ 70,000)

  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
    79,368

    Re: Lookup/Match with multiple results, removing duplicates

    Will you please attach a sample Excel workbook? Nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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
    Registered User
    Join Date
    11-20-2017
    Location
    Delaware
    MS-Off Ver
    2010
    Posts
    3

    Re: Lookup/Match with multiple results, removing duplicates

    Thanks for the response! I have created and attached a mock file - the third tab merely shows my desired results while 1 & 2 have information in the same place as my real report.
    Attached Files Attached Files

  4. #4
    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
    79,368

    Re: Lookup/Match with multiple results, removing duplicates

    Explain your expected outcomes.

  5. #5
    Registered User
    Join Date
    11-20-2017
    Location
    Delaware
    MS-Off Ver
    2010
    Posts
    3

    Re: Lookup/Match with multiple results, removing duplicates

    My expected outcomes, as seen on the third tab of my attachment, are that a user would type the animal they are reporting on into the large box (B2) - this will then activate the formula in column K to search the data in column B on tab 2 "animals" - when a match is found in column C, the data in column B will be returned to sheet 1 K6. K7-K25 will pull back the Animal Names from subsequent matches, skipping duplicates.

+ 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. Replies: 3
    Last Post: 06-25-2014, 02:40 PM
  2. Lookup Multiple Results and omit Duplicates
    By YJ1234 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-02-2014, 09:30 PM
  3. [SOLVED] generate random results, removing only SOME duplicates
    By jrosko1 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-04-2013, 12:00 PM
  4. generate random results, removing only SOME duplicates
    By jrosko1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-02-2013, 04:54 PM
  5. [SOLVED] LOOKUP multiple results but ignore duplicates.
    By vane0326 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-09-2013, 02:31 PM
  6. Lookup or match function with multiple criteria giving different results
    By Mian USman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2013, 09:15 AM
  7. Lookup with multiple results, without duplicates
    By Rothman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2006, 05:30 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