+ Reply to Thread
Results 1 to 6 of 6

data validation - error when unique value is added

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    england
    MS-Off Ver
    Excel 2016
    Posts
    53

    data validation - error when unique value is added

    i have found this code: =COUNTIF($A$1:$A$20,A1)=1

    which when using 'data validation' works great to prevent duplicate values.
    I however want the opposite. I want it to warn the user if they are adding a new value that is not already in column...

    any thoughts?? can't find this anywhere!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,412

    Re: data validation - error when unique value is added

    Maybe change it to >1?
    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

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,627

    Re: data validation - error when unique value is added

    How about.

    =COUNTIF($A$1:$A$20,A1)<1

    If that doesn't help we need an uploaded Excel file (not a pic or screen shot ... we need context).

    If you aren't familiar with how to do this:


    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  4. #4
    Registered User
    Join Date
    04-02-2013
    Location
    england
    MS-Off Ver
    Excel 2016
    Posts
    53

    Re: data validation - error when unique value is added

    Both worked a treat. thank you!!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,412

    Re: data validation - error when unique value is added

    Happy to help and thanks for the feedback

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,627

    Re: data validation - error when unique value is added

    Same here.

+ 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] Data Validation Unique Value
    By qiyusi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-01-2017, 12:23 PM
  2. Data Validation Unique Value
    By qiyusi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-25-2017, 12:38 AM
  3. Replies: 0
    Last Post: 02-21-2014, 12:39 PM
  4. [SOLVED] Need a 2nd Criteria added to an Existing Data Validation
    By Webbers in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-24-2013, 12:46 PM
  5. Replies: 0
    Last Post: 09-08-2011, 02:22 PM
  6. Data validation for cells in added row.
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2011, 11:15 AM
  7. Replies: 1
    Last Post: 06-24-2005, 12:21 AM

Tags for this Thread

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