+ Reply to Thread
Results 1 to 3 of 3

Extracting unique values from filtered column to array

  1. #1
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Extracting unique values from filtered column to array

    Hi all

    I have a need to
    1. Filter a sheet,
    2. Extract unique values from a column, and
    3. Populate a listbox (on another sheet) with the unique values.

    I can filter using VBA, but I don't have the foggiest on how to extract unique values from a filtered column into an array.
    The filter

    Please Login or Register  to view this content.
    With this, the idea is that I can use a listbox(1) to select the items I want to filter. This will filter the sheet. Then I collect the unique values from another column which I can then use to populate listbox(2)

    then listbox(3),(4)... and so on.

    It should be noted that I am using this code to extract unique items, but I don't now how to make it work with a filtered list

    Please Login or Register  to view this content.
    I'm sorry I can't share my sheet because that would be pointless, and because it's too big and contains company data.

    Can anybody suggest some code that will help with this?

    Cheers
    Last edited by Journeyman3000; 08-12-2020 at 05:18 PM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Extracting unique values from filtered column to array

    I have been using this line of code to filter a column of data(Contents of B), find the unique values, and paste them to a row far to the right(BB), where last is the end row in the range. Maybe you can leverage it.

    Please Login or Register  to view this content.

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

    Re: Extracting unique values from filtered column to array

    I'm sorry I can't share my sheet because that would be pointless
    The idea is to set up a sample file that depicts your actual file setup...
    This way one can immediately see what your scenario is and assist in creating the perfect code snippet...

    Pointless to try and offer a solution as there could be multiple solutions posted and none would benefit you as they are not written for your file setup...
    Code is tailor made...

    See here for a few ideas...
    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!!!

+ 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] Extracting unique values from a column
    By CDandVinyl in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 10-25-2019, 10:11 PM
  2. [SOLVED] Translating array formula - count unique values between dates on filtered sheet - to VBA
    By L plates in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-10-2018, 09:45 AM
  3. [SOLVED] Dynamically Extracting Unique Values from Filtered List (Visible Rows Only)
    By AliGW in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-08-2018, 10:37 AM
  4. [SOLVED] Formula extracting unique column values
    By labogola in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-10-2013, 02:34 AM
  5. Count unique, visible values in a filtered column
    By kajakk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-07-2013, 08:42 AM
  6. count unique values in filtered column
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2013, 10:40 AM
  7. Count Unique Values in a Filtered Column
    By mashley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2008, 10:56 AM

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