+ Reply to Thread
Results 1 to 6 of 6

VBA to check if Data validation selections are not duplicated

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    VBA to check if Data validation selections are not duplicated

    I have drop down list in Column B on my Daily Chgs Tab. I would like to enter Some code that would check to see if once they choose a drop down that it is not duplicated or it was chosen before on any of the other Choices.

    And if it has already been chosen to say please choose another you can not have duplicate entries.

    Also can it be added that if within that range (b3:b60) has there been a maximum of 45 rows with data entered.

    I have more Rows with choices that my destination sheet will allow so I would like to be able and alert the user that he has used all the rows available for input.
    Last edited by bdouglas1011; 09-29-2014 at 03:34 PM.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: VBA to check if Data validation selections are not duplicated

    I think having an example would help, I'm a bit confused by your explanation. But a very basic example of how to look for a duplicate value:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Re: VBA to check if Data validation selections are not duplicated

    Sorry here is the sheet I just don't want the user to be able and use the same drop down selection in column B on the Daily Chgs Tab

    I have alot of things being added to this so this is just one of many threads I have to start.

    Let me know if this helps.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Re: VBA to check if Data validation selections are not duplicated

    I had an error I changed and added 'Dim S as Variant'

    Please Login or Register  to view this content.

    it had given me a variable not defined.

  5. #5
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Re: VBA to check if Data validation selections are not duplicated

    Do you know how to add to the code so it looks at that range and counts all the rows that have data in them and tell if it is greater than 45 lines...if so have mess box tell them to modify entries to only have 45 selections for the destination sheet.

    I will have more input rows than the destination sheet will allow if the user fills in all drop downs.



    Or even better can it be set up to ... if the user does have more input than 45 rows in the column than it will add to the destination sheet inserting that number over 45 into the sheet starting at row 52 on the Job ticket tab and still keep all formatting

  6. #6
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    639

    Re: VBA to check if Data validation selections are not duplicated

    How would I change it to not only look for the duplicate but also not allow the duplicate to be used
    Right now you can still use the duplicate I would like it to block user from using it if possible

+ 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. Pivto table based on Data validation selections
    By gareth1981 in forum Excel General
    Replies: 0
    Last Post: 05-28-2014, 10:05 AM
  2. Filter Multiple Selections Data Validation
    By yisfromer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-25-2013, 12:23 PM
  3. Multiple selections from data validation macro
    By strud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2013, 05:09 AM
  4. Replies: 3
    Last Post: 06-16-2011, 10:37 PM
  5. check duplicated data
    By kevincwk2000 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-18-2008, 12:44 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