Find Duplicates in Excel
Upload a sheet or paste a list, choose the columns that decide a match, and see every repeated row highlighted without deleting anything.
Updated
How to find duplicate rows
- Choose your file, or paste cells copied from Excel or Google Sheets and select Use pasted data.
- Leave First row is a header ticked if row 1 holds column names. The header row is never marked.
- Under Columns to compare, select the columns that decide a match, such as Email or Order number. With none selected, two rows match only when every column is the same.
- Tick Match case if capital letters should count as a difference.
- Read the two counts. Rows that have a duplicate is the number of marked rows. Repeated values is how many different values are repeated.
- Check the highlighted rows in the preview, then select Download .xlsx or Download .csv.
The result updates each time you change an option. Every row in a repeated set is marked, including the first one, so you can see the full set side by side. The download keeps all your rows and adds a Duplicate column at the end with Yes on each marked row. Filter or sort on that column in Excel to review them.
Find duplicates in Excel itself
With conditional formatting
- Select the column or range to check.
- Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
- Pick a format and select OK.
Excel shades every cell whose value appears more than once in the selection. This rule works cell by cell. If you select three columns, a name in column A that also appears in column C is shaded, which is rarely what you want. Check one column at a time, or use a formula for whole rows.
To see only the shaded rows, turn on Data > Filter, open the column’s arrow and choose Filter by Color.
With a COUNTIF formula
Add a helper column and enter this next to the first data row:
=COUNTIF($A$2:$A$100,A2)>1
Fill it down. TRUE means the value in column A appears more than once. The dollar signs keep the range fixed while A2 moves down with each row.
To see how many times each value appears, drop the comparison:
=COUNTIF($A$2:$A$100,A2)
To mark only the second and later copies, and leave the first one unmarked, let the range grow as it fills down:
=COUNTIF($A$2:A2,A2)>1
Duplicates across several columns
COUNTIFS checks more than one column at once. This is TRUE when both the name and the email match another row:
=COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2)>1
Highlighting whole rows
- Select the data, starting at the first data row.
- Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
- Enter
=COUNTIF($A$2:$A$100,$A2)>1, choose a format, and select OK.
The $A2 reference locks the column, so the whole row is shaded when column A repeats.
In Google Sheets
Select the range, then go to Format > Conditional formatting. Under Format cells if, choose Custom formula is and enter:
=COUNTIF($A$2:$A$100,A2)>1
COUNTIF and COUNTIFS take the same arguments in Google Sheets, so the helper column formulas above work unchanged.
Which method to use
| Situation | Best option |
|---|---|
| Quick look at one column | Conditional formatting, Duplicate Values |
| Whole rows, or a match on several columns | This page, or COUNTIFS in a helper column |
| You do not have Excel open | This page |
| You need a column you can filter and sort | This page, or the COUNTIF helper column |
| You want the repeats deleted | Remove duplicates |
| You want a tally of each value | Count unique values |
Mistakes to avoid
- Choosing the wrong columns. Two orders from one customer share an email and are still different orders. Compare the column that should be unique, such as the order number.
- Trusting what the cell looks like. A trailing space makes two values different to Excel. This tool ignores spaces at the start and end of a cell. Inside Excel, clean the column with TRIM first.
- Long numbers in COUNTIF. COUNTIF treats digit strings as numbers and Excel keeps 15 significant digits, so two different 16-digit card or ID numbers can be reported as the same.
- Deleting before reviewing. Finding comes first. Look at the marked rows, decide which copy to keep, then remove.
Limits
- 50 MB per file. Formats: .xlsx, .xls, .xlsm, .csv, .tsv, .txt and .ods.
- One sheet is checked at a time. Pick the sheet from the tabs above the options.
- The file is read on your device and is not uploaded.
- The download contains values. Formulas are replaced by their results, and cell formatting, including the highlight colour, is not carried over. Use the Duplicate column instead.
Questions
How do I find duplicates in Excel?
Select the column, then go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values and select OK. Every value that appears more than once is shaded. The tool above does the same for whole rows and gives you a count.
How do I find duplicates without deleting them?
Use highlighting or a helper column instead of the Remove Duplicates button. This page only marks rows. The download keeps every row and adds a Duplicate column with Yes next to the repeats.
What formula finds duplicates in Excel?
=COUNTIF($A$2:$A$100,A2)>1 returns TRUE when the value in A2 appears more than once in the range. Put it in a spare column and fill it down. See the COUNTIF page for how the criteria work.
How do I find duplicates across two columns?
Select both columns under Columns to compare. In Excel, use =COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2)>1, which is TRUE only when both cells match another row.
Is the first occurrence marked as a duplicate too?
Yes. Every row whose values appear more than once is marked, including the first one. To flag only the second and later copies in Excel, use =COUNTIF($A$2:A2,A2)>1.
Does upper and lower case matter?
Not by default. Excel's Duplicate Values rule and COUNTIF both ignore case, and so does this tool. Tick Match case to treat ABC-1 and abc-1 as different values.