+ Reply to Thread
Results 1 to 6 of 6

Dropdown to list unique values from growing list?

  1. #1
    Registered User
    Join Date
    02-07-2005
    Location
    Albany, Oregon
    Posts
    9

    Dropdown to list unique values from growing list?

    Hi.

    I have a single Excel spreadsheet on which I have an ever-growing list of names in one column. (It'll never be longer than a few hundred rows.)

    Is it possible to create a dynamic dropdown box, on that same page, that will list ONLY the UNIQUE values from within that growing list?

    For example, the list may contain:

    PCT (Patient Care Technician)
    Asset Protection Specialist
    Housekeeper
    PCT (Patient Care Technician)
    Asset Protection Specialist
    Asset Protection Specialist
    Dimentional Trainee
    Finisher Trainee
    PCT (Patient Care Technician)
    PCT (Patient Care Technician)
    Housekeeper
    [etc]

    I want the dropdown to only show the unique values from that growing list:

    Asset Protection Specialist
    Housekeeper
    PCT (Patient Care Technician)
    Dimentional Trainee
    Finisher Trainee

    It's a boon if I can organize the list alphabetically, too. But not a problem is not possible.

    Thank you in advance for your help in this.

    Please keep in mind I am pretty much a novice at this.

    Thanks.

    --John

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Dropdown to list unique values from growing list?

    1. Set up a named range on your original column to expand as needed, using this formula:

    =Sheet1!$A$2:INDEX(Sheet1!$A$2:$A$1000,COUNTA(Sheet1!$A$2:$A$1000))

    Hit CTRL-F3 to view how the Named range (called "list") is set up.

    2. Then use this array formula, in D2 copied down:

    =IFERROR(INDEX(List, MATCH(MIN(IF(COUNTIF($D$1:D1, List)=0, 1, MAX((COUNTIF(List, "<"&List)+1)*2))*(COUNTIF(List, "<"&List)+1)), COUNTIF(List, "<"&List)+1, 0)),"")


    3. Then set up another named range ("dropdown"), using this formula:

    =OFFSET(Sheet1!$D$2,,,SUMPRODUCT(--(LEN(Sheet1!$D$2:$D$100)>0)))


    4. Then use Data validation In H2 to h20: DATA/DATA VALIDATION/List and =Dropdown in the "applies to" box.


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...


    uniques and sorted.

    NB The intermediate column (D, in yellow) can be located on a hidden sheet, or wherever, if you want.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 04-16-2017 at 01:30 PM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Dropdown to list unique values from growing list?

    Hi John,

    I'd do this problem a little different than Glenn. I have problems with those CSE formulas so I'd use a Pivot Table and a little VBA to refresh the pivot and sort. See the attached that keeps Glenn's Dynamic Named Range of "List" and does a Pivot to get your answer.

    PT from DNR with Refresh Event and autosort.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Dropdown to list unique values from growing list?

    Fair point, although I am no longer a fan of Pivot Tables... How do you go from there to a dropdown (the second part of the q - which I failed to spot when I first replied...)?

    basically - how can you make a DV "list" or whatever grow/shrink with the Pivot table?
    Last edited by Glenn Kennedy; 04-16-2017 at 01:50 PM.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Dropdown to list unique values from growing list?

    Hey Glenn,

    I'm so glad you asked... Create a Dynamic Named Range using the Pivot Table column. In the Validation List use the DNR and poof, it works.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Dropdown to list unique values from growing list?

    Yeee Haaa!

    perfecto.

+ 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: 7
    Last Post: 11-21-2016, 04:40 PM
  2. [SOLVED] Populate a combobox with unique names from a growing list
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2016, 05:16 AM
  3. Create dropdown list in Excel that will only list unique entries
    By MissAudrey in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-22-2015, 04:56 PM
  4. [SOLVED] Combobox unique dropdown from list with duplicate values error
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2014, 06:38 AM
  5. Dropdown list always shows unique values from a column based on lookup value
    By swood15 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2014, 12:46 PM
  6. Unique list of records dropdown in Data Validation list
    By sghosh12 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2013, 08:27 AM
  7. count unique items in ever-growing list?
    By MeatLightning in forum Excel General
    Replies: 2
    Last Post: 03-17-2006, 02:10 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