+ Reply to Thread
Results 1 to 12 of 12

Unique Values in Dynamic Down List

Hybrid View

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Question Unique Values in Dynamic Down List

    Hello,

    I'd like to automatically populate a drop-down list with the unique values contained in a table's column using the value of another column. So if my table looked like this:

    REGION OFFER
    North Learning Tools
    North Learning Tools
    North New Offers

    I'd want the drop-down list to only show "Learning Tools" and "New Offers" when "North" is selected in a different cell (the attached table shows other regions). It would be great if the drop-down list is sorted - but not mandatory.

    Is this possible without macros/VBA?

    Thanks
    Attached Files Attached Files
    Last edited by philchi; 07-28-2019 at 04:28 PM. Reason: Updated spreadsheet

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

    Re: Unique Values in Dynamic Down List

    Hi philchi,

    See the attached that does what I think you want. I did need to do a macro to accomplish your problem.

    Dynamic Dropdown using Advanced Filter Unique.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    Thanks for responding MarvinP. Unfortunately, Excel Macros are disabled by Windows Group Policy in our organization so I cannot use this solution. Also cannot use VBA because it is not supported on SharePoint online.

    Maybe there's a two step process - one array to get all of the Offers based on the Region and a separate function in the Data Validation List field that only retrieves the the unique values from that array.

    Possible?

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

    Re: Unique Values in Dynamic Down List

    Hi philchi,

    I used a simple Advanced filter to do your problem. Then I automated it to change based on a Validation cell. You could learn Advanced Filters and do the problem manually. You simply change the North, South, etc and click through the Advanced Filter dialog. Hope this helps.

    If you had a newer version of Excel like 2016 there are new functions called Dynamic Array Functions that can do your problem. What version of Excel do you have?
    https://www.excelcampus.com/function...-spill-ranges/ if you have updated 2016 version of Excel.

  5. #5
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    MarvinP,

    I'm using Office 365 (a much newer version than 2016) and my understanding is Dynamic Arrays are not in General Availability - only limited members in the Excel Insiders program have access to these features. But yes, if the functionality was generally available, I could use the new =UNIQUE and =SORT functions to meet my needs.

    You (or anyone else) have any ideas on how to accomplish this with arrays?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,873

    Re: Unique Values in Dynamic Down List

    This may seem like a round about way to get this done, however...
    1. Populate columns L:O for the four regions using: =COUNTIFS(OffersTable[[Offer]:[Offer]],$K9,OffersTable[[Region]:[Region]],L$8)
    2. Populate lists of contents in columns G:J using: =IFERROR(INDEX($K$9:$K$22,AGGREGATE(15,6,(ROW($K$9:$K$22)-ROW($K$8))/(L$9:L$22>0),ROWS($A$1:$A1))),"")
    3. Name (see name manager) the lists of contents using the following as the refers to: =Solutions!$I$9:$I$22
    4. Use the following as the source of the data validation: =OFFSET(INDIRECT(G3),0,0,SUMPRODUCT(--(INDIRECT(G3)<>"")),1)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    The example above partially works though it wasn't clear to me how to incorporate in the dropdown. Perhaps I wasn't clear in my question so I've updated the original post's attachment (and posted here as well).

    I've figured out how to get the unique values in the drop-down list, however it requires three separate functions each piggy-backing off of the other.

    Based on the clarified question/expected result and my sample - is there a better way of doing this without VBA/Macros (perhaps cut the 3 formula down into a single formula)???

    Thanks
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    In case the separate question confused things - anyone have any suggestions on how to make this process more effcient - cut the 3 formulas down to 2 (maybe even 1) formula?

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Unique Values in Dynamic Down List

    Please try at
    F17
    =IFERROR(INDEX(OffersTable3[Offer],SMALL(IF(FREQUENCY(IF(OffersTable3[Region]=$F$16,MATCH(OffersTable3[Offer],OffersTable3[Offer],)),ROW(OffersTable3)-ROW(A$1)),ROW(OffersTable3)-ROW(A$1)),ROWS(F$17:F17))),"")
    Press Ctrl+Shift+Enter and drag down

    Data Validation list
    =OFFSET($F$17,,,COUNTIF($F$17:$F$27,"?*"))
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    Quote Originally Posted by Bo_Ry View Post
    Please try at
    F17
    =IFERROR(INDEX(OffersTable3[Offer],SMALL(IF(FREQUENCY(IF(OffersTable3[Region]=$F$16,MATCH(OffersTable3[Offer],OffersTable3[Offer],)),ROW(OffersTable3)-ROW(A$1)),ROW(OffersTable3)-ROW(A$1)),ROWS(F$17:F17))),"")
    Press Ctrl+Shift+Enter and drag down

    Data Validation list
    =OFFSET($F$17,,,COUNTIF($F$17:$F$27,"?*"))
    Bo_Ry - thanks for responding but for some reason it only works when "East" is selected. If North, South or West is entered in F16, there are blanks in F17 on and some of the Offers entries are missing. There aren't any blanks in the table so I'm curious how those are being returned.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Unique Values in Dynamic Down List

    Please press Ctrl+Shift+Enter and drag down again
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    07-20-2019
    Location
    Miami
    MS-Off Ver
    365
    Posts
    69

    Re: Unique Values in Dynamic Down List

    Quote Originally Posted by Bo_Ry View Post
    Please press Ctrl+Shift+Enter and drag down again
    Yep, that fixed it - Thanks!!!

+ 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] dynamic and dependent drop down list with unique values
    By Villalobos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2019, 03:50 PM
  2. [SOLVED] Create a list of unique values from several columns in a dynamic table.
    By schurchill39 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-28-2018, 06:51 PM
  3. [SOLVED] Get list of unique values from dynamic range
    By BG1983 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-09-2018, 02:15 PM
  4. dynamic list of unique values
    By td3201 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2017, 12:38 AM
  5. [SOLVED] Dynamic Unique List from multiple dynamic columns
    By JO505 in forum Excel General
    Replies: 7
    Last Post: 06-11-2015, 05:41 PM
  6. [SOLVED] List unique values from multiple dynamic lists
    By andredl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-22-2014, 02:37 AM
  7. Create unique list from dynamic list with dupes
    By kfryar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-10-2014, 09:20 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