Closed Thread
Results 1 to 7 of 7

Prevent duplicate entries in Data Validation List By code

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Prevent duplicate entries in Data Validation List By code

    Hello everybody
    I want to know is it possible to prevent duplicate entries Data Validation list in a column by code .. in worksheet_Selectionchange
    How to do that if poosible?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Prevent duplicate entries in Data Validation List By code

    Hi,

    Perhaps

    Please Login or Register  to view this content.
    Personally I wouldn't use the sheet selection change event since it will fire every time you change anything on the sheet.
    I'm reading into your question that you want the validation list updated before you use it. The sheet Activate event would be preferable since it would only fire when you go to the sheet. Even that may be OTT if the list never changes during your session. Perhaps the workbook close event might be preferable.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Prevent duplicate entries in Data Validation List By code

    Thanks Mr Richard
    I think your code remove duplicates .. My question about preventing the user from entering duplicate value in the VD Lists?
    There is a solution that I get here by formulas but I want it by vba

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Prevent duplicate entries in Data Validation List By code

    Mr. Richard I tried your code it is great
    But there is a problem a bout the cells that have VD and empty are removed I just need to remove the duplicate values not to remove VD prepared before

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Prevent duplicate entries in Data Validation List By code

    I have found the solution in my original thread in page 2 but I didn't notice that
    Please Login or Register  to view this content.
    Thanks for offering help . I'm very grateful for your great help

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Prevent duplicate entries in Data Validation List By code


  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Prevent duplicate entries in Data Validation List By code

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Ignore Duplicate Entries on (dynamic) Data Validation List
    By irmaosver in forum Excel General
    Replies: 2
    Last Post: 02-05-2014, 05:00 PM
  2. Replies: 0
    Last Post: 06-14-2012, 12:38 PM
  3. To prevent duplicate entries using Data validation.
    By legendkiller420 in forum Excel General
    Replies: 3
    Last Post: 07-09-2010, 07:47 AM
  4. Preventing duplicate entries using a data validation list
    By turbofatty in forum Excel General
    Replies: 4
    Last Post: 04-21-2010, 10:12 AM
  5. [SOLVED] Prevent Duplicate Validation List Entries
    By JK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2006, 04: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