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

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

arrow blue right bubblePrevent duplicate entries with Data Validation feature

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

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 120 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

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Comments  

+2#Ravikiran2013-10-26 06:50
Good and useful tips.
Reply | Reply with quote | Quote
0#Sharad2013-11-26 04:49
Usefull tips ! Thanks for sharing
Reply | Reply with quote | Quote
0#SAM2013-12-17 10:44
Thank you so much :)
Reply | Reply with quote | Quote
+1#BAD2014-01-07 06:31
Duplicate entry still allowed for copy and paste.
Reply | Reply with quote | Quote
+1#Sameer Awais2014-01-21 14:54
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
Reply | Reply with quote | Quote
0#Admin_jay2014-01-22 01:29
Quoting 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

:roll: It cannot prevent duplicate entries from entering as Copy and Paste.
Reply | Reply with quote | Quote
0#Muhammad Naveed2014-02-10 10:27
Thanx for this useful formula
Reply | Reply with quote | Quote
0#Luis2014-02-25 21:55
Thanks!!! save my day...
Reply | Reply with quote | Quote
+2#VENKATESH2014-06-28 10:02
WHEN I COPY PASTE THE DATA IT NOT WORKING ... PLEASE HELP ME
Reply | Reply with quote | Quote
-1#ATIQ2014-07-09 06:48
Thank You Very Much "For This Formula"
Reply | Reply with quote | Quote
0#mohamed2014-07-21 08:02
thank you, nice information to study
Reply | Reply with quote | Quote
0#tester2014-08-01 14:16
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.
Reply | Reply with quote | Quote

Add comment


Security code
Refresh