The tutorial explains how to search for duplicates in Excel. You will learn a few formulas to identify duplicate values or find duplicate rows with or without first occurrences. You will also learn how to count instances of each duplicate record individually and find the total number of dupes in a column, how to filter duplicates, and more. Continue reading
Comments page 6. Total comments: 264
Thank you very much, Svetlana for these very comprehensive explanations about "duplicate issue" in Excel. I was trying to find out how to remove duplicates from the file and I have found an easy way in your article. All the best!
Dear Team
I want to extract a data in single formula. Suppose i have 10k Mobile No in my data in single column, i want to extract the count of unique Mobile Number suppose 7K mobile number is unq, so output of 7k updated in column 1 and rest duplicate value is 0. I have using Pivot every time for count the unique mobile no..
Kindly help
Hello,
I need to remove duplicates inside specific cells.
7G4285-49,7G4202-72,7G4202-72,7G4202-72,7G4202-72,7G4202-72,7G4202-72
7G4285-49,7G4285-49,7G4285-49
7G4285-49,7H4202-72,7H4202-72,7H4382-49
7H4203-72,7H4203-72,7H4203-72,7G4282-49,7H4383-49,7G4202-72
7H4382-25,7H4382-49
7H4382-25,7H4382-49
I need to keep only one value for each cell.
Thanks,
Bogdan
What happen if the information exceeds 255 characters?, I have to compare whole row but if I excced 255 characters i received #VALUE error
Duplicate of same names not written in the same order
DD MM YYYY DD/MM/YYYY
06 04 2017 06.04.17
25 04 2017 25.04.17
23 03 2017 23.03.17
08 08 2017 08.08.17
02 09 2017 02.09.17
30 12 2014 30.12.14
21 01 2015 21.01.15
29 03 2015 29.03.15
I FILL UP SOME DATE OF BIRTH DEFIRANT CELL(25 DAYS 04 MONTH 2017 YEAR) HOW TO MAKE TOGATHER NEXT CELL 25.04.2017 OR 25/04/2017
PLEASE SOLVE IT.
Hello,
Please try to solve your task with the help of the Merge Cells tool which is a part of our Ultimate Suite for Excel. You can download its fully functional 14-day trial version using this direct link.
After you install the product, you will find Merge Cells in the Merge section under the Ablebits Data tab.
Hope this will help you with your task.
Hi, I'm trying to highlight, and so prevent duplicates in a number of cells. For example if I am designing an appointment time slot of 09:00, 10:00 and 11:00 across B22:B24 how can I get Excel to highlight that configuration if the same slotting is repeated/redesigned in AL22:AL24?
Hello,
I am using your array formula to count duplicates in a column. In it's current form, it also counts the empty cells as duplicates. Is there a way to make it ignore empty cells?
{=ROWS($A:$A)-SUM(IF( COUNTIF($A:$A,$A:$A)=1,1,0))}
My second questions is - Can you adjust the formula to make it ignore the original in the count?
For example, if a result in the column occured twice it would count two, but only one is the duplicate since the first is the original. I would like it to count only one for each pair or two there are three of the same value, etc.
D
For EX
we have a location
DEL-LON
LON-JFK
MCO-TPA
We have to find that DEL or LON or JFK or MCO or TPA are repeating how many times in each row.
Hello, pankaj,
I'm afraid there's no easy way to solve your task with a formula. Using a VBA macro would be the best option here.
However, since we do not cover the programming area (VBA-related questions), I can advice you to try and look for the solution in VBA sections on mrexcel.com or excelforum.com.
Sorry I can't assist you better.
Hi,
I am wondering if someone could help me?
I have some data with 2 columns of interest. One column is the case number and the other is number of days the case took to complete. Given the inadequacies of the search tool available, I have multiple duplicates for some of the cases. Not all cases are duplicated, and those that have been duplicated have been duplicated anywhere between 2 and 6 times. With each case duplicate, I have another time value generated. Some of these time values are the same for all duplicates, some are different, and they are not in numerical order.
What I am trying to do is for each case, to pick out the largest time value.
The example below might make more sense:
What I have- What I want-
CASE TIME CASE TIME
A 2 A 5
A 1
A 5
B 4 B 4
C 3 C 3
C 1
D 4 D 4
D 4
D 4
E 1 E 1
F 2 F 6
F 2
F 6
F 2
F 2
F 2
Hopefully someone can get further with it that I have been able to! Thank you in advance!
(sorry the example, but clearer hopefully!)
What I have-
CASE TIME
A 2
A 1
A 5
B 4
C 3
C 1
D 4
D 4
D 4
E 1
F 2
F 2
F 6
F 2
F 2
F 2
What I want-
CASE TIME
A 5
B 4
C 3
D 4
E 1
F 6
Hello, Hannah,
Please try to solve your task with the help of the Consolidate Sheets tool which is a part of our Ultimate Suite for Excel. You can download its fully functional 14-day trial version using this direct link.
After you install the product, you will find Consolidate Sheets in the Merge section under the Ablebits Data tab. To get the result you need, you should choose the following options on step 2 of the Wizard:
1. Select the “Max” function to consolidate your data from the drop-down list;
2. Choose the “Consolidate by label” option and tick both check-boxes next to “Use header label” and “Use left column label”.
Hope this will help you with your task.
Dear Svetlana.
I have an issue regarding to duplbicates in Excel.
Name Number of apples
Anne 2
Anne 8
Anne 5
Eric 14
Eric 7
What I want to do is to sum up all the number of apples given each name.
So I need the result to be Anne: 15 apples and Eric 21 apples. Do you know how to calculate this? I have used the Sumifs function, but I get this result:
Name Number of apples Total number of apples each person
Anne 2 15
Anne 8 13
Anne 5 5
Eric 14 21
Eric 7 7
So my question is, how can I use a function that just gives me the sum of number of apples every person without showing the sum of the other rows. So I want the result to be this:
Name Number of apples Total number of apples each person
Anne 2 15
Anne 8
Anne 5
Eric 14 21
Eric 7
I would appreciate your help.
Best regard,
R.R.
Dear Rouzbeh Rasai,
The reason why you get the wrong result using SUMIFS function is probably that you did not use absolute cell reference.
Try this formulas:
=SUMIF(A$2:A$6,"Anne",B$2:B$6)
=SUMIF(A$2:A$6,"Eric",B$2:B$6)
As for the result you want to receive, to get it you need to create a VPA macro.
I have collected data from several production batches about the duration of a certain process step.
batch 1 3.4 hours
batch 2 3.6 hours
batch 3 2.8 hours
batch 4 3.1 hours
batch 5 3.5 hours
batch 6 3.1 hours
batch 7 3.6 hours
In the example above, the lowest repeatable duration is 3.1 hours. So, this could be an achievable standard duration for this process step. The following array formula obtains the lowest repeatable duration.
={MIN(IF((COUNTIF($A$1:$A$7;$A$1:$A$7)>1);$A$1:$A$7;MAX($A$1:$A$7)))}
Now, I'm having problems with the next step. The following durations first need to be rounded to 1 decimal, before the lowest repeatable can be found.
batch 1 3.412 hours
batch 2 3.629 hours
batch 3 2.834 hours
batch 4 3.101 hours
batch 5 3.506 hours
batch 6 3.097 hours
batch 7 3.611 hours
Is there a way to incorporate rounding of the numbers into this array formula?
Hello,
How do you check duplicates vaules acroos a number of columns. For instance i have member numbers in Col A whic contains duplicates and i want to check if they all have the same start date & end date in col B and C respectively.
How to calculate my exact age
My Date of Birth is 08.04.1987
in 01.01.2017 my age ?
Please solve it.
Can you give a formula for the below-
Column1--column2
56-------10
34-------30
14-------20
34-------40
14-------10
Result
56-------10
34-------70
14-------30
Can you give a formula for the below-
Column1--column2
56-------10
34-------30
14-------20
34-------40
14-------10
Result
56-------10
34-------70
14-------30
I have a spreadsheet with 12,000+ rows that I need to de-dupe. I want to identify the dups, and mark some of those for deletion. My columns headers are: EEID, EEName,CLP1,CLP2,CLP3 - through CLP12
The EEID and EEName columns definitely have duplicates. I want to delete only the records that have blank CLP1 columns.
Example:
EEID EEName CLP1 CLP2
1234 Diana
1234 Diana Analyst Rover
As long as Diana doesn't have any data in the CLP columns, her record can be deleted.
Which formula should I use?
Hi !
I have a problem: i don't know how i find the duplicates with exceptions. For ex.: 1,2,3,2,3,4,2,1. I want to color the duplicates without "1". Can you help me?
Thank you,
Ciprian
Thank you so much!
Hi!
This article seems to be very interesting, but I have noticed that the formula syntax in my MS Excel is different.
In particular it is:
=COUNTIF(range; criteria)
For example:
To count how many times the value in A1 is repeated in the range A1:A100 the working formula works is:
=COUNTIF(A1:A100;A1)
Then, I suppose that the syntaxes are different and it seems to me that they follow diffent criteria.
In fact, if I used the first formula you indicated, that is
=COUNTIF(A:A, A2)>1
in my MS Excel doesn't work.
Could you help me to understand which criteria I have to use to translate you syntax?
Thank you so much
Ivan
Hello, Ivan,
as you may notice, the arguments are divided by semicolon (;) in your formula, while in ours – by (,) comma. It may happen due to the regional settings for the list separator. Try the formula below and read this topic to find out more.
=COUNTIF(A:A; A2)>1
Using a formula above, I was able to identify duplicate and unique rows based upon 3 separate columns (Barcode, Custodial Account, OSVer) in my spreadsheet. Now that I have the rows identified, I need a formula that will keep only the unique rows where the Barcode and OSVer are duplicates, but the Custodial Accounts are different based upon the most current date contained in the LastHWScan column. My spreadsheet has 50000 rows of data and will change daily.
Barcode CustodialAcct OSVer LastHWScan
315374 11313 10 3/23/2017 0:04
315374 11313 10 3/17/2017 3:39
315376 212 10 3/23/2017 18:14
315376 11376 10 3/17/2017 2:48
315377 11313 10 3/23/2017 14:27
315377 11313 10 3/16/2017 11:35
315381 11313 10 3/23/2017 22:33
315381 11313 10 3/16/2017 15:49
315391 11313 10 3/23/2017 9:54
315391 11313 10 3/16/2017 8:55
315394 11376 10 3/23/2017 18:42
315394 11313 10 3/17/2017 2:29
315396 212 10 3/23/2017 20:38
315396 11376 10 3/15/2017 14:41
The formula can't change the data in another cell. You can create an additional 'Helper' column and, using the next formula, indicate unique rows (CTRL+Shift+Enter to create an array function):
=IF(D2=MAX(IF( ($A$2:$A$15=$A2)*($B$2:$B$15=$B2)*($C$2:$C$15=$C2)=1,$D$2:$D$15,0)),"Unique","")
As a result, you will have something like in the example below. But it will run slow within a large data amount.
My Date Of Birth is 08.04.1987 how to calculate perfect age as on 01.01.2017
Plz explian the formula.
thank u mam, ur blog is excellent.
i've a Q.: i want to list the values that occurred more than 1, e.g.-
Column A Column B
a a
b b
a
b
c
a
e
plz explian the formula.
Hello,
Am trying to prevent duplicates for culoum with condition from another coloum.
for example, if coloum b1:b100 contain the word "Store ID" or "Model Number" then countif($e1:$e100,e1)=1
Thanks
I want to filter name and amount with corresponding to category : please help :
Name_______Category_______Amount
Abdul _______Fresh _______5000
Abdul _______Online_______10000
Rac ______ Fresh _______2000
Rac ______ Online_______20000
Abdul________Fresh _______10000
Rac ________Fresh _______2000 ..... Now i want to count Abdul Fresh Amounts only ...... any formula without filtering...!
Result should show in :
Adbul ....... 15000
Rac ......... 4000
is it possible ...? thanks for help if its possible.
MAK
i want create another cell for duplicates values.
Thank you for this post, it has helped immensely and I've been able to adjust as required.
I shall now wear my Excel Genius Crown with pride as I work others magic! I'll share this post after a day or two..... I want to feel superior for just a bit
XD
Thank you!
WHATS WRONG WITH THIS FORMULA? NOT WORKING? USING EXCEL 2016
=IF(COUNTIFS($CU2:$CU59862,CU2, $CA2:$CA59862,CA2, $FL2:$FL59862,FL2, $DA2:$DA59862,DA2, $DV2:$DV59862,DV2) >1, "DUPLICATE ROW","")
THIS FORMULA is NOT WORKING?
But, I want to see that when I put next same number show me 2,3,4,5,6,7, ...........
Please help me.
Please show how to find double numbers such double account numbers/Phone Numbers in next cell 1,2,3,4
Every tutorial of abletits has nice explanation of excel formulaes, especially by Svetlana Cheusheva. Thanx a lot to this site.
Kindly let me know is there other sheet find valid and invalid formula.
Hi team,
I have duplicates like this mentioned below . There are around 1000 of such records. I can easily eliminate using duplicate, but here the problem when i take the complete new dump from the system , still i get these since it is not deleted from the system.
serial_number Remarks
SMC18290095 Correct
SMC18290095 Duplicate Serial no.
Rest all the values are same in the excel . In my master file i have identified which is correct and which is duplicate . Now i take a recent new dump from the system (new report) and wanted to bring these remarks mentioned above.
The problem here is it picks only the 1st mentioned Remarks (Correct) for both the duplicates.
Result below when comparing with the master file
serial_number Remarks
SMC18290095 Correct
SMC18290095 correct
Kindly let me know is there any other way to find the duplicates.
Regards
Sudeer
This works but I have multiple values listed in each cell separated by commas. The find and select function is able to identify each value separately but the conditional formatting formula does not recognize individual values but the cell as a whole. Any ideas?
How to use refresh in Auto filter
Regards
DrBJR
Hello,
I want to know about countif formula exm.apple in a cell is repeated 4time while a mango is repeated in same cell 10 time. I wnt to give only a unique number to these cell in next column how can i do.mean apple=1 while it is repeated so many time doesn't matter.
How we find duplicate values from the row using with function formula in excel
when we value enter in cell it check it is unique and duplicate and if vaue unique it display in another cell and if it duplicate it's ignore the value in excel
Hi Svetlana Cheusheva,
While finding duplicates i have used formula "IF(Countif($A$6:$A6,$A6)>1,"Y","N")" this is fine if it works with text, however if used to find duplicates by concatenating numbers and date this formula fails to works....
length of the number is 48 in each cell.... because of this the formula cant validate?
Can you please help me...
Thanks
Sathya
Hello,
I'm wanting to count the number of days worked in a month and ignore the duplicates. For example:
20/05/2016
20/05/2016
21/05/2016
22/05/2016
22/05/2016
The answer should be 3 days because I don't want to count the duplicates.
Try Pivot Table to summarize your workdays. Pivot table is great because it is versatile. Just insert -> pivot table -> make sure the table is selected and then click okay.
hi.. i have the same problem here.. do you have a solve?
Thank you so much Svetlana!
I am trying to write a formula in conditional formatting that would highlight duplicate values in a column, but only those duplicates with a value >1. I have several 1's in the column, but do not want those to be highlighted. Is there a way to accomplish highlighting only those duplicate values whose value is >1? Thank you ever so much!
Hi Lisa,
Assuming your values are in column A, you can create a conditional formatting rule withe one of these formulas, where A2 is the first and A10 is the last cell with data.
Highlight duplicates including 1st occurrences:
=AND($A2>1,COUNTIF($A$2:$A$10, $A2)>1)
Highlight duplicates without 1st occurrences:
=AND($A2>1, COUNTIF($A$2:$A2, $A2)>1)
Hi Svetlana, thanks so much. I'm afraid I was not clear in my earlier post - I am trying to write a formula in conditional formatting that would highlight duplicate number values in a column, but only those duplicates with a number value >1. Not based on occurrences of the number, but the number value itself.
My number values in the column range from 1 to 5000, and while there will be many "1"s in the column, I do not want those highlighted. Only the duplicate number values greater than "1" (i.e., 2-5000) do I want to highlight.
Is there a way to apply a threshold to the highlight duplicates conditional formatting? Thank you again! Lisa
Hello Lisa,
The formulas do exactly what you describe :)
The difference is that the second formula does not highlight the 1st occurrence of a duplicate number in a column while the first formula does. 1's are ignored in both cases.
For example, if you have number 100 in cells A2 and A3, the 1st formula will highlight both cells, while the 2nd only A3. I've created a simple example for your reference and you can download it here.
Dear Ablebits Team,
I have a couple of question I am hoping you can help me with.
Can I use the count duplicate function to create a list of all duplicates and also the amount of each duplicates in each list? I do no want to delete the duplicates as they essentially only have a PO number the same other details are different.
Also, is there a way I can have a tab for data entry which then adds said data to the list of data currently in use.
I can forward a copy of the workbook if you reply via email to the email address provided.
Thank you for your time.
King Regards,
Mark
Hi I'm trying to delete(or minus, source 1 minus source 2) cells, if the cells contain the same information from two different source. For example,
source 1 source 2 result
product product product
a123 a123 b123
b123 c123 d123
c123 a123 a123
a123 a123
d123 g123
a123
a123
g123
Is any functions I can use to get the result? (I was thinking to use IF function and VLook to show if there is a match, then filter all the match, delete them. But that won't be reasonable, if some products display more than one times from both sources)
Sorry, format change, example seems awkward
s 1
a123
b123
c123
a123
d123
a123
a123
g123
s 2
a123
c123
a123
result
b123
d123
a123
a123
g123
Dear Team
I have some values in Sheet1. I need to show in sheet 1 the duplicates occuring in sheet 2.
For example :I have clients buying mobile credit.
In sheet1,they are listed with their mobile number .In sheet two ,they are buying credit several times during the week .I need to show in sheet1 how many time the client bought credit looks at the duplicated in sheet2.
Note as I update sheet2 on the credit amount ,sheet1 would would recognise the number and count duplicate (number of times credit was bought)
Dear Team,
I am Bhagwat Shinde. excel in one problem how to find the duplicate data in large data base vlookup throw please help me.
Below mentioned my mail id please sent suggestion on my mail id.
Regards,
Bhagwat Shinde.
Hi,
Great tutorial. I'm wondering if there is a way for excel to automatically count a duplicate, show the value (number of duplicates) in another cell and then delete the duplicate while still maintaining that value.
As an example. I'm trying to create a spreadsheet where I enter multiple entries (let say number of packages people have). Like so:
A B
Name # Packages
Alex 1
Michael 1
Amy 1
Alex 1
As above example, when I entered Alex name again, I want Excel to identify that his name is already in the entry and it will automatically add 1 to the first occurrence of Alex and will remove the Alex entry I just made.
I know this can be done in combination with Conditional Formatting where I can change the color of the cell if there is a duplicate. But I wish to make it even better so I could do that automatically.
Basically the algorithm would be:
1.Excel sees there's a duplicate.
2.Plus 1 to the column B of the first occurrence.
3.Delete the duplicate while still maintaining the value of the B column in the first occurrence.
4.Repeat the process if there is more duplicate entry.
So, this is basically a live iteration where Excel is counting and removing while I'm still in the process of entering data. Not just at the end when I'm done with it.
I hope someone can help.
Thanks
Sorry for the messed up example. I don'n how to post a screenshot here in the comment. But the example was Column A (Name) and Column B (#Packages)
I have about 1 million e-mail addresses and I want to find all of the duplicates and then delete duplicates.
I do not follow your directions.
What would it cost to send you the list and have you do that for me?
Steve
Please send me your work sheet and Email ID address. I will finish ASAP.
Hello Steve,
If you have all of the email addresses in a single column, the easiest (and free) way to remove duplicates is using Excel's built-in Remove Duplicates tool, the detailed instructions are here.
If you still cannot achieve the desired result, please send me your worksheet (support@ablebits.com), and I will see if I can help.
Amit,
The formula was wrong. Try this one, it will work.
=IF(COUNTIF($A$2:$A2, A2)>1,"Duplicate","")
Dear Bekim,
Your formula identifies duplicates without 1st occurrences. The formula mentioned by Amit identifies duplicates in cells A2:A8 including their 1st occurrences. Both formulas are correct, and which one to use depends on a particular task. The following screenshot shows the difference:
Hi,
I need a count of Unique & Duplicate value as 1.
In above formula it counts only duplicates
Receipt Count
2001
2001 1
2002 1
2003
2003 1
2004 1
The find duplicates formula doesn't work for me.
I have used exactly what you have listed on this page:
=IF(COUNTIF($A$2:$A$8, $A2)>1, "Duplicate", "")
with the exact criteria, but it highlights all cells as duplicates, I have changed the copy series drop down to fill and it doesn't work.
I would really like to get it working, as its really bugging me and also is a very useful formula to know.
thanks
Amit
Dear Amit,
The formula is correct. Just be sure to properly adjust the cell references in the formula, where A2 is first and A8 is the last cell of the range that you want to check for duplicates.
If you have a variable range, you can use the column reference like this:
=IF(COUNTIF(A:A, $A2)>1, "Duplicate", "")