How to Find Duplicates in Excel (3 Easy Ways)
In this article
- Highlight Duplicates in 6 Clicks
- How to Tell It Worked
- The One Failure Everyone Hits: Duplicates That Won't Highlight
- Which Method Fits Your Job
- Flag Duplicates With COUNTIF, Step by Step
- Delete Duplicates Without Losing Unique Rows
- Settings That Change the Answer
- Comparing Two Lists, Not One
- Large Sheets Stay Fast With Whole-Column Ranges
Select your data, open Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, and Excel shades every repeated entry in seconds. For a list of duplicates you can sort or filter, or to delete them, use a COUNTIF formula or the Remove Duplicates tool instead.
Time 2 min · Steps 6 · Level Easy
Highlight Duplicates in 6 Clicks
- Select the range. Click the first cell and drag to the last, or click the column letter to check a whole column.
- Open Conditional Formatting. On the ribbon, go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. (Menu labels can differ slightly by Excel version.)
- Confirm "Duplicate" in the dialog. The dropdown defaults to Duplicate; leave it.
- Pick a fill colour. Choose "Light Red Fill with Dark Red Text" or Custom Format for your own colour.
- Click OK. Every value that appears two or more times is shaded instantly.
- Clear it when done. Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells removes the shading without touching the data.
How to Tell It Worked
Shaded cells should appear the moment you click OK, with no recalculation delay. Two quick checks: first, sort the column (Data > Sort A to Z) and confirm the shaded cells sit together in blocks — a lone shaded cell far from its twin usually means hidden spaces in the text. Second, pick any shaded value and press Ctrl+F to search for it; the Find All count should be 2 or more. If nothing highlights at all, your range probably contains formulas returning different-looking results, or the duplicates differ by trailing spaces.
The One Failure Everyone Hits: Duplicates That Won't Highlight
The most common problem is data that looks identical but isn't. "Smith " with a trailing space and "Smith" are different values to Excel, so neither gets flagged. Fix it by cleaning the column first: add a helper column with =TRIM(A2), copy it, then paste the results back over the original using Paste Special > Values. The same issue appears with numbers stored as text — a green triangle in the cell's corner is the giveaway. Select the column, click the warning icon, and choose Convert to Number. After cleaning, run the highlight steps again.
Which Method Fits Your Job
Highlighting is for seeing duplicates; the other two tools do something with them. Pick by what you want at the end:
- Just want to see them: Conditional Formatting. Non-destructive, works on up to about 1 million rows, colour stays live as you edit.
- Want a yes/no flag per row: COUNTIF formula. Put =COUNTIF(A:A,A2)>1 in an empty column and fill down; it returns TRUE for every value that appears more than once.
- Want them gone: Data > Remove Duplicates. Deletes repeated rows permanently — copy the sheet first.
Flag Duplicates With COUNTIF, Step by Step
COUNTIF is the method to use when you need a filterable answer rather than colours. In an empty column next to your data:
- Type the formula. In row 2 of the helper column, enter =COUNTIF(A:A,A2)>1 (replace A with your data's column letter).
- Fill it down. Double-click the small square at the bottom-right of the cell to copy the formula to the end of your data.
- Read the results. TRUE means the value in that row appears at least twice; FALSE means it's unique.
- Filter if needed. Data > Filter, then filter the helper column to TRUE to see only duplicated rows.
To show the count instead of TRUE/FALSE, drop the ">1": =COUNTIF(A:A,A2) returns 3 for a value that appears three times. To compare two columns — say column A against column B — use =COUNTIF(B:B,A2)>0 to flag values in A that also exist in B.
Delete Duplicates Without Losing Unique Rows
Remove Duplicates keeps the first occurrence of each value and deletes the rest, so you end up with one row per unique entry. Before running it, right-click the sheet tab and choose Move or Copy to make a backup — the action cannot be undone after you save and close. Then:
- Select your data including headers.
- Go to Data > Remove Duplicates.
- Tick the columns to compare. Tick only "Email" to treat rows as duplicates whenever the email matches, even if names differ; tick several columns to require all of them to match.
- Click OK. Excel reports how many duplicate rows it removed and how many unique values remain.
Settings That Change the Answer
| Setting | What it does |
|---|---|
| Conditional Formatting "Duplicate" | Flags values appearing 2+ times |
| Conditional Formatting "Unique" | Flags values appearing exactly once |
| Remove Duplicates, one column ticked | Deletes rows whenever that one column repeats |
| Remove Duplicates, all columns ticked | Deletes only fully identical rows |
| COUNTIF range A:A vs A2:A100 | Whole column is safer if your list grows |
Comparing Two Lists, Not One
A related job is finding entries that appear in both of two separate lists. Put the lists in columns A and B, then in column C enter =COUNTIF($B$2:$B$500,A2) and fill down. Any result of 1 or more means that value exists in list B too; 0 means it's only in list A. Filter column C to hide the zeros and you have your overlap. This also works for catching duplicate entries between an old sheet and a new one — point the range at the old sheet's column and flag anything already recorded.
Large Sheets Stay Fast With Whole-Column Ranges
On sheets with tens of thousands of rows, COUNTIF over a full column (A:A) is quicker to set up and recalculates fine, but avoid volatile tricks like array formulas over entire columns. Conditional Formatting handles large ranges without slowing down. If a highlight takes visibly long to appear, check that your selection doesn't extend past your data into empty formatted rows — selecting whole columns when only 500 rows have data is the usual cause. Trim the selection to the used range and it responds instantly.
Official source: Microsoft Support