+ Reply to Thread
Results 1 to 5 of 5

How to do lookup in VBA with multiple results?

  1. #1
    Registered User
    Join Date
    12-06-2021
    Location
    Netherlands
    MS-Off Ver
    Latest
    Posts
    3

    How to do lookup in VBA with multiple results?

    Hey,

    I have a list of products that I want to lookup against a big database of products. The difficult part is that one product can have multiple matches in the database and I need to have all matches come up in the results (unlike with vlookup). Also each product has multiple criteria that I want to copy down to the results page.

    I made a mockup document with hopefully a little bit of a more clear explanation. In reality the database has around 100k rows of data.

    Greetings,
    Bassie
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: How to do lookup in VBA with multiple results?

    Why go through all that trouble when all you have to do is sort The table on Col 3 to get the same result...

    OR


    Is this not the exact setup of your actual file...I suggest uploading a sample file representing your actual file data
    Please Login or Register  to view this content.
    Last edited by sintek; 03-28-2022 at 09:50 AM. Reason: Removed file...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: How to do lookup in VBA with multiple results?

    My effort attached
    Attached Files Attached Files

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: How to do lookup in VBA with multiple results?

    Here's another option...won't be much difference in timing...
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: How to do lookup in VBA with multiple results?

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Lookup to match multiple criteria and return multiple results excluding duplicates.
    By kris3012 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-13-2018, 11:06 AM
  2. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  3. Replies: 1
    Last Post: 09-04-2014, 12:14 PM
  4. [SOLVED] Is it possible to lookup multiple values and return multiple rows of results?
    By justin11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2013, 12:02 PM
  5. [SOLVED] Sumifs with multiple lookups with multiple results to lookup other values
    By malisesaucier in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2013, 01:13 AM
  6. Replies: 11
    Last Post: 02-07-2013, 02:22 AM
  7. Lookup multiple & non duplicated results for multiple matching criteria
    By melvil007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-19-2012, 01:22 AM

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