+ Reply to Thread
Results 1 to 4 of 4

Lookup first n number of results from filtered table to another sheet

  1. #1
    Registered User
    Join Date
    09-02-2022
    Location
    Oregon, United States of America
    MS-Off Ver
    Office 16
    Posts
    2

    Post Lookup first n number of results from filtered table to another sheet

    Excel help example.xlsx

    Hello!

    I am running into trouble attempting to reference a filtered table. I have a table of data consisting of 4000+ rows, 20+ columns. The most important column is the ID# column. I apply multiple filters based on certain criteria, and I need the first 15ish number of filtered results ID#s to appear on another sheet. Once the data is on another sheet, I use Index Match to lookup other data from the columns associated with the ID#s.

    In my attached example, the "IDs" tab is where I need the IDs from the filtered data to be output. I use the IDs to index/match data from the columns associated with it. I tried to make a very simple example by creating some random IDs, associating them with household items, and then adding two criteria (edible, found in kitchen) so that we can filter [ see "Data" tab ].
    For example: If I filter for "Edible", i need the first few ID#s for the edible items to show up, and so on with other filter combos.

    Previously, I had created a macro to simply Copy+paste the entire filtered table of results on to a new worksheet, and then reference the first 15 IDs directly from that worksheet. It was a bit clunky and I have a feeling there is a more efficient way to do this.

    The part of this that has really held me up is that I only need 15-20 results max, but my filtered data may return over 1000 results.
    Please point out any areas I am not being specific / clear enough, happy to elaborate.

    Thanks in advance!
    Last edited by FetchOpt; 09-02-2022 at 06:25 PM. Reason: SOLVED

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Lookup first n number of results from filtered table to another sheet

    Hi,
    welcome to the forum.

    Perhaps this function is helpful for you, to be placed in C3 and copied below
    Please Login or Register  to view this content.
    Cheers
    Eastw00d
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Registered User
    Join Date
    09-02-2022
    Location
    Oregon, United States of America
    MS-Off Ver
    Office 16
    Posts
    2

    Re: Lookup first n number of results from filtered table to another sheet

    Hi there,

    Thanks for the warm welcome and helpful response. Your formula has done exactly what I need! I modified it to fit into my database I am working with- but it works absolutely brilliantly.

    Thanks again!

  4. #4
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Lookup first n number of results from filtered table to another sheet

    Hi FetchOpt,
    Thank you for your kind words and rep.points.
    Have a blessed day!
    Cheers
    Eastwood

+ 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] VBA to copy filtered results from 1 table to another table
    By josephteh in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-07-2022, 09:08 PM
  2. Histogram on filtered table, results only on filtered rows
    By Cheesecube in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 03-25-2018, 03:54 AM
  3. Replies: 0
    Last Post: 02-11-2017, 05:56 AM
  4. Pivot table not showing filtered results
    By Dan.Reynolds in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-28-2013, 02:09 PM
  5. Replies: 1
    Last Post: 11-01-2012, 12:28 AM
  6. Copying and pasting pre-filtered results into same row number?
    By Twomsta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2012, 10:44 PM
  7. Applying formulas to a table of filtered results
    By jovialtom in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-21-2007, 07:21 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