Comments on: How to find duplicates in Excel: identify, highlight, count, filter

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 5. Total comments: 264

  1. 016230240
    016259070
    012350891

    If i would like to add a 6 in front of above number only, example 016 become 6016230240 , the back of 0 will appear 6 also if i find 0 and replace by 6, however i just like to have 6 infront of the number, what is the the process , pls help, thank you..

  2. Hi,

    How can I distinguish repeating brand names? For example:
    Gillette --> Gillette 1
    Gillette --> Gillette 2
    Pantene --> Pantene 1
    Gillette --> Gillette 3
    Head & Shoulders --> Head & Shoulders 1
    Pantene --> Pantene 2

  3. How can i arrange the Values of duplicate attendance number from below
    Attendace Value
    168755 41759002
    168755 41704067
    197119 40316326
    197119 40811539
    204786 41446987
    204786 41025753
    285943 41696614
    285943 41232806
    181907 40538480
    181907 40117598
    986727 40450723
    986727 41072614
    768565 40098263
    768565 40403845
    693968 40455014
    693968 40987284
    998263 40044440
    998263 40928398
    366864 41736203
    366864 41644887
    837218 40222382
    837218 40621245
    837218 4063258
    to
    Attendance Value 1 Value 2 Value3
    168755 41759002 41704067
    197119 40316326 40811539
    204786 41446987 41025753
    285943 41696614 41232806
    181907 40538480 40117598
    986727 40450723 41072614
    768565 40098263 40403845
    693968 40455014 40987284
    998263 40044440 40928398
    366864 41736203 41644887
    837218 40222382 40621245 4063258

  4. Hi
    am saikat patra from Howrah in west bengal.
    Can anyone help me about if count formula details given below.
    colum 1 colum 2
    78120 above10days
    78121 above10days
    78122 abovel0days
    78560 above5days
    78121 above10days
    How to count colum 2 tex wise to colum 1 shipment no without duplicate.
    ans should be if above10days basis is "3".
    please help me and very much gladfull to you for this.

  5. Hi,

    how can i get the duplication data for example i want the excel to read the data from 6 last alphabet of an email.

  6. Highlight duplicate values across multiple worksheets.
    I have a workbook with four worksheets. We are clearing out a storage center and listing the bins on worksheet "Empty Bins" as they become empty. Worksheets "Aisle 1", "Aisle 2", and "Aisle 3" list all the bins in the system.
    How do compare the data on worksheet "Empty Bins" to the data on the three other worksheets to find and highlight duplicates? Thank you.

  7. I have 55000 entries in a single column 10 digit numbers. I have to find duplicates. But the problem is the numbers may have difference by addition of excess 3 4 digits at the ending or starting.

  8. If duplicate is there, then I want result as first value in row1 against duplicate name. Any one pls. help to get result as mentioned in column3
    Eg, below.
    Column1---Column2---Column3(RESULT)
    1 -------Siva -------1
    2------- Kumar -------2
    3 -------Suresh ------3
    4 -------Siva ------1
    5 --------Kumar -----2

  9. I have a row with header in row1, for example; Boat1, Boat2, Boat3, Boat4, Boat5 and numbers in the next row, 5, 6, 7, 5, 4. I want to identify the duplicate headers or header/number, which in this case is Boat1, Boat4 or Boat1/5, Boat4/5. Happy for the result to be shown in two separate cells.

    Thank you

  10. good evening sir

    i have a problem that
    i type some values ie., 2,4,5,7,8,2,9 in a specific cell how to find out duplicate values in excel cell please send forumala for self use it is very need full to me

  11. dear all,
    is that able to find the decimal value from next column:

    1101
    1102
    1103
    1101H
    1102HR
    1103H

  12. hi
    I have a problem with deleting some specific data from large table which already have duplicate value , but I want only to find if my specific data in that table and delete it without removing the other duplicates

  13. Column1 Column2
    0 10
    10 20
    15 25

    in the above ranges 15-20 have been repeated and that has to be spotted and removed

  14. Hello!
    Could we make this:
    COUNTIF($A$2:A2,A2) to work in ArrayFormula()?

    When I try this
    =ARRAYFORMULA(C1:C&COUNTIF($C$1:C, $C$1:C))
    It shows a total number in each repeated cell like:
    a 4
    b 1
    c 2
    a 4
    a 4
    a 4
    c 2

    But I still need to receive

    a 1
    b 1
    c 1
    a 2
    a 3
    a 4
    c 2

    To have a full column with unique values based on another column with repeats.

    Big thanks in advance.
    Best

  15. how to find duplicate in a single row.

    example:

    Row1: 23 44 42 44 53 23 this row should be tagged as dulicate

    1. Prakash:
      Svetlana recently wrote a very good article on this topic. The article was published here on Ablebits on April 26.
      Enter "Find duplicates" in the search box and you'll see the article "How to find duplicates in Excel: identify, highlight count, filter, and more". Click on that link and once you've read the article you'll be able to accomplish what you want.

  16. Is it possible to get the number the duplicate in order that they appear?
    For example
    123,1
    124
    123,2
    123,3
    125
    123,4

    1. Frank:
      I don't see any duplicates in this data.
      Are you asking to match the first three digits?

  17. Dear Svetlana,
    I hope you can help me with the following question.
    I have a list of cities and some of them are repeated in the list. I would like to extract the row reference of all repeated city names (i.e for a given city: New York - is repeated in row 2, 7, 29, 33 etc).

    Is this possible?

    thank you,
    Kos

  18. Hi all Dear

    Can you help my question like this? i want to khnow formula use Auto in Group:

    Items Code Expiry Date Auto to Group
    1234567 1-Jan-18 01
    1234567 2-Feb-18 02
    1234567 3-Mar-18 03
    1234567 4-Apr-18 04
    1234567 5-May-18 05
    1234567 1-Jan-18 01
    1234567 3-Mar-18 03
    1234567 5-May-18 05

    Thank all dear.

  19. Hi,

    Thank you for all of the information on here.

    I am experiencing a range limit on the use of this calculation? For some reason it is only letting me check 20 rows, anything above that is returning a result of 0. Is this normal?

    What I really want to do is check an entire column in a table for values (there is about 1000), but as soon as i do this the returned value is zero. If it is less than 20, the returned value is acurate.

    I am using;
    =SUM(IF(ISTEXT(A28:A37)*COUNTIF(A28:A37,A28:A37)=1,1,0)) - works

    =SUM(IF(ISTEXT(A:A)*COUNTIF(A:A,A:A)=1,1,0)) - total is zero

    =SUM(IF(ISTEXT(A1:A37)*COUNTIF(A1:A37,A1:A37)=1,1,0)) - total is zero

  20. Dear Sir/Madam

    Please help
    I have following data.
    A1 = Maths/Bio. Gurpreet,Sandeep
    A2 = Physics Kuldeep
    A3 = Economics Priyanka
    A4 = Maths/Physics Gurpreet, Ramesh

    It's a school time table
    As I type the name "Gurpreet" in B1 it shows me duplicate
    I wish to find if some Teacher's name is repeated in Column A

    1. Create three separate columns. First column has the class name, the second has the teacher's name and the third has another teacher's name.
      Separate the teacher's names into two columns.
      Then, in a fourth column enter =COUNTIF(B:B,B1)>1
      The result will show "TRUE" if it is a duplicate.
      If you want to see if the teachers in column C are duplicates, just enter =COUNTIF(C:C,C1)>1 into column D.

  21. 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!

  22. 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

  23. 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

  24. What happen if the information exceeds 255 characters?, I have to compare whole row but if I excced 255 characters i received #VALUE error

  25. Duplicate of same names not written in the same order

  26. 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.

    1. 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.

  27. 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?

  28. 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

  29. 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.

    1. 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.

  30. 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!

    1. (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

      1. 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.

  31. 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.

    1. 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.

  32. 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?

  33. 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.

  34. How to calculate my exact age
    My Date of Birth is 08.04.1987
    in 01.01.2017 my age ?

    Please solve it.

  35. 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

  36. 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

  37. 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?

  38. 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

  39. Thank you so much!

  40. 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

    1. 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

  41. 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

    1. 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.

  42. My Date Of Birth is 08.04.1987 how to calculate perfect age as on 01.01.2017

    Plz explian the formula.

  43. 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.

  44. 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

  45. 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

  46. i want create another cell for duplicates values.

  47. 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!

  48. 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","")

    1. 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.

  49. Please show how to find double numbers such double account numbers/Phone Numbers in next cell 1,2,3,4

  50. Every tutorial of abletits has nice explanation of excel formulaes, especially by Svetlana Cheusheva. Thanx a lot to this site.

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)