+ Reply to Thread
Results 1 to 10 of 10

Validation rule dropdown list without duplicate values

  1. #1
    Registered User
    Join Date
    06-20-2009
    Location
    Belgrade, Serbia
    MS-Off Ver
    Excel 2007
    Posts
    35

    Question Validation rule dropdown list without duplicate values

    Does anyone know how to get rid of duplicate values in validation dropdown menu. Im using a range for the list that has a lot of repetative values. I want to have only unique ones in the list.
    Any ideas...
    Thanks in advance!

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Validation rule dropdown list without duplicate values

    Any ideas?
    Maintain unique selections in a separate list - it makes it much more simple to maintain and manage.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Validation rule dropdown list without duplicate values

    You can quickly get the "unique values" from a long range of values into another column using the Data > Filter > Advanced Filter.... copy to another location>unique values only.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    06-20-2009
    Location
    Belgrade, Serbia
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Validation rule dropdown list without duplicate values

    Thanks. Good ideas. Didn't know about advanced filter option.
    Problem is i will be updating my main sheet all the time, and it will be a bit difficult to manage all this data (copy filtered). Is there a way maybe to automate updating filtered unique values.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Validation rule dropdown list without duplicate values

    Hi


    ....OR... take a look, here!


    http://www.excelforum.com/excel-2007...down-list.html

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Validation rule dropdown list without duplicate values

    You can use the Advanced Filter to get the values in place the first time. Then from there you can employ a macro in the background to watch what you do on Sheet1 in column A to update your Sheet2 column A list and add any new values that you enter.

    This is the basic idea, I've used it many times. I'm sure it will need tweaking for your real scenario:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-20-2009
    Location
    Belgrade, Serbia
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Validation rule dropdown list without duplicate values

    Quote Originally Posted by JBeaucaire View Post
    You can use the Advanced Filter to get the values in place the first time. Then from there you can employ a macro in the background to watch what you do on Sheet1 in column A to update your Sheet2 column A list and add any new values that you enter.

    This is the basic idea, I've used it many times. I'm sure it will need tweaking for your real scenario:

    Please Login or Register  to view this content.
    First of all thanks for the code. I think this will solve my problem, when i get it to work (need this for 4 or 5 columns).
    Also i have been inserting macro functions in worksheets many times but this one eludes me. Can you please tell me if this one needs "special care".

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Validation rule dropdown list without duplicate values

    The sheet that this needs to be active in...
    1) Right-click the sheet tab and select VIEW CODE (this will open the sheet module)
    2) Paste in the code given, make your tweaks.

    Note: there can only be ONE worksheet_change macro in the sheet module, so if you need it to do more things in more columns, the one macro must be expanded to do the work. You mention you need this on many columns... what columns? And where do the values for each column watched transfer to on the other sheet?

  9. #9
    Registered User
    Join Date
    06-20-2009
    Location
    Belgrade, Serbia
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Validation rule dropdown list without duplicate values

    I have managed to make it work on one row. I want to do this for five rows (A,B,C,D,E one next to each other), and make this rows update unique values in sheet2 in the same rows as in sheet1.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Validation rule dropdown list without duplicate values

    Did you get this all sorted out? Sorry I missed your last post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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