Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to prevent duplicate entries in a column in Excel?

As we all known, Data Validation is a very useful feature in Excel, you can use it to create drop down list in a cell and limit the values user can enter. But sometimes you may want to prevent users from entering duplicate values in a range of worksheet. How could you avoid duplicate entries in Excel?

Prevent duplicate entries with Data Validation feature

Quickly prevent duplicate entries with one click

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubblePrevent duplicate entries with Data Validation feature


For example, I am entering identify card number into a range of cells (A1:A20), and I want to make sure all item numbers entered in range A1:A20 are unique. To prevent duplicates, follow these steps:

1. Select the range of cells that will contain the item numbers.

2. Go to Data > Data Validation > Data Validation. See screenshot:

doc-prevent-duplicate-entries1

3. And a Data Validation dialog box will display. Click the Settings tab, then click drop down list under Allow, choose Custom, and then enter this formula “=COUNTIF($A$1:$A$20,A1)=1” into the Formula box. See screenshot:

doc-prevent-duplicate-entries2

4. And then click Error Alert tab, under the Title box, enter “Duplicate Entry”, and enter the proper message in the Error message box, such as “The value was already entered. All Item Numbers must be unique. Please try again.”

doc-prevent-duplicate-entries3

5. Click OK to finish it.

Now when you enter a duplicate number, Excel will prevent the entry and alert the user with an error message, it will show up like this:

doc-prevent-duplicate-entries4


arrow blue right bubbleQuickly prevent duplicate entries with one click

It is somewhat difficult for us to use Data Validation function to prevent duplicate entries, now I will introduce you an easy and quick way to solve this task.

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Get it Now.

With Kutools for Excel, you can prevent duplicate entries with one click. Please do as this:

1. Select the range that you want to prevent duplicate entries.

2. Click Kutools > Prevent Duplicate Entries, see screenshot:

doc-prevent-duplicate-entries5

Now when you enter the same data with the first data in the range, you will get the following warning:

doc-prevent-duplicate-entries6


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Shubham · 7 months ago
    not working properly. only work in manual entry if i use "CTRL+D" then it allows duplicate entry.
  • To post as a guest, your comment is unpublished.
    guna · 1 years ago
    i want to select the name of workers to whom duty allotted to a particular place what excel formula is to be used to find if i use vlook formula is shows the last worker repeatedly
  • To post as a guest, your comment is unpublished.
    Justas · 1 years ago
    I have same problem like some other users do. I used this formula, but now i can't enter any value. What might be wrong?
  • To post as a guest, your comment is unpublished.
    Li · 2 years ago
    I used your formula to restrict name duplications. But then it is giving warning to whatever name I enter. Maybe it is detecting by per alphabet instead of the whole name? How can I solve this problem?
  • To post as a guest, your comment is unpublished.
    Chris · 2 years ago
    I am currently using this to not allow duplicates for a form of a schedule. However there are some exceptions I need to allow to be duplicated. Is there a way to allow certain values or in my case text to be duplicated while everything else is not allowed?
  • To post as a guest, your comment is unpublished.
    GARY · 2 years ago
    How i do the opposite?
    i have a column of data and want to warn the user if they are entering a NEW item number that doesn't match any previous enteries
    • To post as a guest, your comment is unpublished.
      Parwez · 2 years ago
      [quote name="GARY"]How i do the opposite?
      i have a column of data and want to warn the user if they are entering a NEW item number that doesn't match any previous enteries[/quote]

      Hi Gary
      As you have mentioned that user is allowed only to enter duplicate data not unique and there are some entries available within particular range.
      Plz try this....
      "=countif($A$1:$A$20,A1)>1"
  • To post as a guest, your comment is unpublished.
    Abdul Baseer · 2 years ago
    thanks alot for the tips, but need your more help as i am working on sheet where i have to record the name of the trainees of the year 2015, so not to train the same trainess again 2017 i have to design the database which shows me the duplicate name by highlighting it, so please help me with it.
    • To post as a guest, your comment is unpublished.
      Parwez · 2 years ago
      Hi Baseer

      Plz select both data 2015 and 2017 and follow as below....
      Home->conditional Formatting ->Highlight Cells Rules->Duplicate Values... Click on OK.
      Duplicate names will be highlighted.
  • To post as a guest, your comment is unpublished.
    Joseph · 3 years ago
    Please Help, How can I put a duplicate entry of values? I want to get a warning once I repeat a number 5 times. NOT ONLY TWICE BUT 5 TIMES. My limit is 5 times. please HELP HELP!!!
    • To post as a guest, your comment is unpublished.
      Parwez · 2 years ago
      Hi Joseph
      Plz try this.....
      "=countif($A$1:$A$20,A1)
    • To post as a guest, your comment is unpublished.
      Parwez · 2 years ago
      Hi Joseph
      I think Your requirement is very simple, plz try this....
      "=countif($A$1:$A$10)
  • To post as a guest, your comment is unpublished.
    Harikrishna · 4 years ago
    unfortunately this formula is not working, it is showing alert when am entering duplicate value, i am using this formula for email id column.
    Please suggest me.
  • To post as a guest, your comment is unpublished.
    shital · 4 years ago
    122
    314
    441
    EXL/112/15-16
    264
    EXL/113/15-16
    EXL/314/15-16
    how can avoid this kind of duplicate values during new entry in excel
  • To post as a guest, your comment is unpublished.
    shital · 4 years ago
    122
    314
    441
    EXL/112/15-16
    264
    EXL/113/15-16
    EXL/314/15-16RY
    HOW CAN AVOID THIS KIND OF DUPLICATE VALUES DURING NEW ENT
  • To post as a guest, your comment is unpublished.
    Rajendra Singh Rana · 4 years ago
    thank you sir, very useful and appreciable :-) .
    • To post as a guest, your comment is unpublished.
      shashi dubey · 4 years ago
      [quote name="Rajendra Singh Rana"]thank you sir, very useful and appreciable :-) .[/quote]
      I can't entry any data after applying this method ...
  • To post as a guest, your comment is unpublished.
    Jimmy · 5 years ago
    It did not work at first but after I unchecked the "ignore blank" box next to custom it worked. Very helpful. Thank you.
  • To post as a guest, your comment is unpublished.
    maryc · 5 years ago
    I have done these steps, however... no matter what I put into the column it says it is a duplicate even thou it is not.

    I have a column that has a header of "P.O.#" I want to prevent from billing more than once for a po.
  • To post as a guest, your comment is unpublished.
    Shlok · 5 years ago
    Nice Tips.... Keep Updating....!
  • To post as a guest, your comment is unpublished.
    tester · 5 years ago
    This formula for some reason doesn't work for named range in Excel 2013. In example, I have a whole A column but the header, i.e. $A$2:$A$1048576, named as 'id'. The formula =COUNTIF(id,A2)=1 correctly gives TRUE or FALSE when used in other cell for test, but it doesn't affect the data validation - it allows duplicate entries. However when used directly =COUNTIF($A$2:$A$1048576;A2)=1, it works for validation as well, giving exactly the same results in other cells.
  • To post as a guest, your comment is unpublished.
    mohamed · 5 years ago
    thank you, nice information to study
  • To post as a guest, your comment is unpublished.
    ATIQ · 5 years ago
    Thank You Very Much "For This Formula"
  • To post as a guest, your comment is unpublished.
    VENKATESH · 5 years ago
    WHEN I COPY PASTE THE DATA IT NOT WORKING ... PLEASE HELP ME
  • To post as a guest, your comment is unpublished.
    Luis · 5 years ago
    Thanks!!! save my day...
  • To post as a guest, your comment is unpublished.
    Muhammad Naveed · 5 years ago
    Thanx for this useful formula
  • To post as a guest, your comment is unpublished.
    Sameer Awais · 5 years ago
    This formula is okay but when I'm write same word they show me Duplicate Entry & if i 2 same word fill mean Copy paste (Ctrl+C/Ctrl V) 2 same word then can't show me Duplicate Entry Erorr
    • To post as a guest, your comment is unpublished.
      Admin_jay · 5 years ago
      [quote name="Sameer Awais"]This formula is okay but when I'm write same word they show me Duplicate Entry & if i 2 same word fill mean Copy paste (Ctrl+C/Ctrl V) 2 same word then can't show me Duplicate Entry Erorr[/quote]
      :roll: It cannot prevent duplicate entries from entering as Copy and Paste.
  • To post as a guest, your comment is unpublished.
    BAD · 6 years ago
    Duplicate entry still allowed for copy and paste.
  • To post as a guest, your comment is unpublished.
    SAM · 6 years ago
    Thank you so much :)
  • To post as a guest, your comment is unpublished.
    Sharad · 6 years ago
    Usefull tips ! Thanks for sharing
  • To post as a guest, your comment is unpublished.
    Ravikiran · 6 years ago
    Good and useful tips.