Today I'll tell you how to prevent duplicates from appearing in a column of your Excel worksheet. This tip works in Microsoft Excel 2013, 2010, 2007 and lower. Continue reading
by Alexander Frolov, updated on
Today I'll tell you how to prevent duplicates from appearing in a column of your Excel worksheet. This tip works in Microsoft Excel 2013, 2010, 2007 and lower. Continue reading
Comments page 2. Total comments: 136
it's working well while typing but it doesn't work when I copy & paste the same value, shows no error, and paste the same value.
can you sort our, please.
thankks
The column I wish to eliminate the entry of duplicates is populated by alphanumeric characters. The formula =COUNTIF($A$1:$A$20,A1)=1 does NOT work:
- direct data entry (typing) meets automatic error message
- copy date entry is permitted even if the same date already in the column.
Excel 2016 - So what IS the correct, working method to prohibit duplicate entries?
Hello Rottweiller!
Unfortunately, Data Validation does not always work (it is mentioned in the last paragraph of the article).
It works only when you put information directly into a cell and press Enter to record changes at the end. If you replace data in a cell by copying or pasting another cell, Data Validation does not see those changes and cannot ban them.
I recommend using Conditional Formatting to see such duplicates.
You can use this formula as a condition: =COUNTIF($A$1:$A$20,A1)>1.
Alternatively, simply use standard Highlight Cell Rules -> Duplicate Values
iam try but not working , any value enter coming error msg
Hi!
Describe in detail what problem you have, and I will try to help you.
If I am copying the same data from another sheet to this column which I have validated,then this is not working out and does not throw any error.please help me in this
Hello Himanshi!
Please describe your problem in more detail.
How were you checking the column?
What data are you trying to copy and paste?
Does the size of the copy area coincide with the size of the paste area?
How is it connected with looking for duplicates?
If you give more information, I will try to help you.
i have excel sheet with contact number this should be duplicate which was repeating again and again
Strange, everything seems fine. but no dialog box pop u if duplicate value entered.
Thank you alexander
YOUR FORMULA SO GOOD AND WORKING, GET CONNECT WITH YOU
THANK YOU SO MUCH
THANK YOU, IT IS GREAT.
Hi,
It is not applicable when pasting. why that is so?
thx
This worked for me, thanks! One question: When the alert shows up, is there a way to track which cell the duplicate is in? Sometimes we have so many entries that manually looking for it can take a while. Thank you!
CORRECTION
Hi There,
Minor issue detected.
For Excel 2013 the formula as mentioned in the article is not allowed.
The seperator between the range and the criteria must be a semicolon, instead of a comma, like this :
=COUNTIF($D:$D;D2)=1
Making this minor correction made it finally work for me ;-)
Thanks
Hi There,
Minor issue detected.
For Word/Office 2013 the formula as mentioned in the article is not allowed.
The seperator between the range and the criteria must be a semicolon, instead of a comma, like this :
=COUNTIF($D:$D;D2)=1
Making this minor correction made it finally work for me ;-)
Thanks
i want to extract the report where mobile number and DATE are same so dont consider duplicate. only consider duplicate mobile numbers which have different date.
Date Mobile
9/18/17 4:09 PM 923005254870
9/18/17 6:45 PM 923005254870
9/14/17 6:10 PM 923008435348
9/14/17 6:29 PM 923008435348
9/7/17 8:13 PM 923023689646
9/14/17 6:55 PM 923023689646
9/9/17 1:00 PM 923032819439
9/12/17 2:28 PM 923032819439
Hi,
i have a list of data but all are 19 digits.
Because of this, duplicates are not identified.
Could you please share with us the solution.
Thanks
Anas
Can this work across tabs? I am trying to prevent duplicate entries being used across 3 separate tabs, all saved in the single file. The cells are the same in each tab (ie. the same column) in each tab if this helps?
Hello,
It would seem that for this to work, you need to have a range with cells following one another. In my instance, my cells are individual, i.e. there could be 3 rows seperating them. This means that when i select the data for which i want the rule, it comes up as individual cells rather than a range.
Any help is appreciated.
thanks a lot for the explanation but i am a trainer and want to prepare a sheet that highlights the names of the trainees who got the training in past years, so that to avoid duplication in trainings
how to validate name field in excel(cell should not accept number or special characters )?
Hey Josh,
please check this article out: how to apply data validation to cells
I have bulk entries in column $b1:$b450 , it also contains repeated text like "AAA" in cells B2, B5, B8, B10 so on.
Now i want to give Sno in $A1:$A450, but i dont want that Serial number consider the duplicate text contain in other cells, it should treat 1 for all "AAA"
Let me know the formula
Thanks
Hi, how do I avoid duplicate entries on multiple sheets. E.g I have listed invoices by month to month on a different worksheet tab (One excel spreadsheet but each tab has say Jan, Feb). I've applied the rule and it works but I want it to pick up too if there was any duplicate entry from previous months (e.g I'm entering data for Feb and I'd like to pick up if there was any same invoice number already entered in previous months or tabs). Thanks
I have the same issue - did you find a solution?
Am trying to prevent duplicates in a column of cells in our project log sheets. Each entry contains eight characters, with the first five being able to repeat, but the last three must be unique and sequential (i.e. JR157001, KR257002, ST457003, etc). We continue to get the last three duplicated with the first five being different and it throws everything into chaos when 10-15 entries later you duplicate an existing entry, then all outside files (other software) with the incorrect numbers have to be reworked, wasting a lot of time. I have tried COUNTIF and a few others, but there is always something no right with the formulas. Thanks.
MUCH EASIER WAY:
CLICK FILTER ADVANCED BUTTON
SELECT COLUMN YOU WISH TO APPLY FILTER TO
CHECK THE BOX LABELED "UNIQUE RECORDS ONLY"
YOU ARE DONE, BOW THE DUPLICATES ARE ELIMINATED AND YOU CAN EMAIL YOUR PEOPLE
HI ,
Could you help me for combine multiple excel ( Car booking data) in one sheet.
Thanks
Is there a custome formula that would work in data validation for this?
I've wasted hours so far... Please help!
How to ignore the first character when avoiding duplicates.
Example:
A70000011
B70000011
Consider this as a duplicate.
Also, not consider text a duplicate.
Example:
A--END--
B--END--
This would NOT be considered a duplicate.
Any ideas?
COPY AND PASTE FIX
I thought this was going to be perfect for my needs, until I realised this method doesn't work if copy and pasting data.
Ok, so this isn't a fix, but rather a solution that suited me and may suit others as well.
I followed the guide at https://www.ablebits.com/office-addins-blog/how-to-highlight-duplicates-excel/
if the link doesn't show or whatever, it's the article titled: How to automatically highlight duplicates in Excel once something has been typed.
Hello, Thank you for the tutorial! I read the part where you mentioned you'd be posting another tutorial on how to check duplicate entries within the same worksheet & even another workbook. I was hoping that you had posted the tutorial & could direct me on where to find it.
Thanks again!
Hello Sbeam,
Here's a full list of our tutorials that cover different ways to find and remove duplicates in Excel:
https://www.ablebits.com/office-addins-blog/tag/excel-duplicates/
Hopefully you will find a solution you are looking for in one of the articles or videos.
NOT WORKING
I am happy after to learn excel command, how to avoid duplicate.
I am thanks.
I tried to do this so many times, i even installed the trim add-on, but it did not work. is there any other way?
Hi,
When i applied Data Validation then it shows some error which says "Name range that you specified can not be found". Can you please help me on this error pls
hi, this is really helpful
Hi, Thank you very much for the information above. It is very helpful. I have a specific question for removing the near match duplicates.
eg. if particular column there are following entries and I want to keep only those with larger data point in the length.
RSAsVAGIVGADEEAPPAPK
SAsVAGIVGADEEAPPA
SsVDDGNINLTDTSTSNK
SsVDDGnINLTDTST
sASAAAILEEDDSKDDmEFK
TFsGIGFNLTEK
In this case following entries
RSAsVAGIVGADEEAPPAPK
SAsVAGIVGADEEAPPA
are the same but I need to keep RSAsVAGIVGADEEAPPAPK but not SAsVAGIVGADEEAPPA.
How it can be done for complete column with various entries? same is true with
SsVDDGNINLTDTSTSNK
SsVDDGnINLTDTST
I need to preserve the longer one and remove the shorter.
Please help me with this.
Please helped me a lot. I have a combination of data in 2 different columns which must be unique.
Example of correct data
emp id | Date
101 | 27/05/2016
101 | 28/05/2016
Example of Incorrect data
emp id | Date
101 | 27/05/2016
101 | 27/05/2016
So I want to stop duplicate data in a combination of columns. I am trying to do but fail always. Please help me in this regard i really need for this ....
Hi, This is really helpful, would like to check, what if the fields that I wanted to control are already an data validation(drop down) field?
Hello,
Im trying to remove the duplicates and duplicates has appear in the next column.
Example:
In column A name has the below Alex,Tom,Tej,Alex,Tom,Alex.
Duplicates has to appear in the B column.
please help me on this
hi,
i have just tried out this formula to one of my spreed sheet and it's great.
However, when i type in a new invoice number on the column I've just selected it keeps picking up as duplicate. Also, how do i remove this format to re-set again? please need assistance asap.
thanks - Vavine Pianta
after failed many times until i disbear it worked by adding space before = and before 2
like =COUNTIF($A:$A,A8) = 2
try it
How do we copy the entire data of my worksheet i'm asking this question because when i select and copy(ctrl+c), it says "That command cannot be used on multiple selections". Please Help
I want to make one table which have no duplicate numbers & also it is random .
Requirement :
First input : 1 - 90 for same numbers came in first column
Second input : 1 -90 random no came in 910 columns but not repeat
I would like to stop duplicate value entry in a self generating list. Any idea how to do it.
Hi,
I am trying to prevent duplicacy by data validation but it is not applicable in case of copy-pase option. what i mean to say is when i copy the cell value and paste somewhere else in the same column it does not show the error message. however it shows when i am typing the same value. in this way my purpose is not fulfilled. plz guide in this regard.
thank you
banashree
Suppose I want this formula to affect the value in the middle of a column up to a certain point. e.g. from D5577 to D10000. Because I already have some data in that column and want the formula to ignore that data.
Input
Column A Column B
Grapes Fruits
Grapes Fruits
Tomatto Vegetable
Apple Fruits
Onion Vegetable
Tomatto Vegetable
Apple Fruits
Mango Fruits
Papaya Fruits
Output
Fruits 4
Vegetable 2
Anybody know the answers.
It works for a new file created "email" colum with "UNIQUE" formula.
I couldn't implement it to an existing file's "email" field after removing duplicates, wanted to convert it's email colum into a unique field, but didn't function.!
Thanking you,,!
AHMED IBRAHIM
DUBAI L,,,
how can i assign two validation on a single cell
one is for list validation (means the data should be from that range)
second i want to prevent them from repetition
how can i do this ?
P7 to P506 have GR# which are for list
i want to prevent C column to not to repeat and should be from the P column
thnx, it war really helpfull!
I am encoding tons of household ID nos which consists 10 digits-4 digits-5digits. I have to ensure that no repetition of the said HH No. The formula is working just fine. However, when I Copy/Paste the whole HH ID No., the formula is NOT working. Any other way that whenever I copy/paste I get the same result of the used formula? Thank you.
It did not work at first but after I unchecked the "ignore blank" box next to custom it worked. Very helpful. Thank you.
It is not working in my excel sheet. please Help me..
This has helped me a lot. I have a combination of data in 2 columns which must be unique.
Example of valid data
Date | Shift
08 Aug | Night
08 Aug | Day
Example of INVALID data
Date | Shift
08 Aug | Night
08 Aug | Night
So I have to avoid entry of duplicate data in a combination of columns. I am not able to figure it out please help.