The fastest way to spot duplicates in Excel
Excel has a built-in tool that highlights duplicate values in seconds. Select the cells you want to check, go to the Home tab, click Conditional Formatting, choose Highlight Cell Rules, then select Duplicate Values. Excel will shade every duplicate entry in the color you pick. This works for any column or range — names, order numbers, email addresses, whatever you're checking.
If you need to find duplicates across multiple columns at once, or if you want to list them separately rather than just highlight them, you have other options that take a few more steps but give you more control over what you're looking for.
Key Takeaways
- The Conditional Formatting tool on the Home tab highlights duplicates instantly and works on any size list.
- The COUNTIF function lets you create a formula that marks duplicates in a new column, giving you a record you can sort or filter.
- The Remove Duplicates feature actually deletes duplicate rows, so use it only when you're certain you want them gone.
- Excel treats uppercase and lowercase letters as different, so "John" and "john" will not be flagged as duplicates.
Using Conditional Formatting to highlight duplicates
This is the method most people use because it's the quickest and doesn't change your data. Select all the cells in the column or range you want to check. Click the Home tab at the top of the ribbon. In the Styles group, click Conditional Formatting, then hover over Highlight Cell Rules, then click Duplicate Values.
A dialog box will open. You can leave the default color (light red) or click the dropdown to pick a different one. Click OK. Every cell that appears more than once in your selection will be shaded. If a value appears three times, all three cells get highlighted — not just the second and third occurrences.
To remove the highlighting later, select the same range again, go back to Conditional Formatting, and click Clear Rules, then Clear Rules from Selected Cells.
Creating a formula to mark duplicates in a separate column
If you want a permanent record of which entries are duplicates without changing the original data, use a COUNTIF formula. This counts how many times each value appears in your list and marks it if it shows up more than once.
Click on an empty column next to your data — let's say your names are in column A and you'll use column B. Click on cell B1. Type this formula: =COUNTIF($A$1:$A$100,A1)>1. Replace A1:A100 with the actual range of your data. This formula returns TRUE if the value in A1 appears more than once in the entire range, and FALSE if it appears only once.
Press Enter. The cell will show TRUE or FALSE. Click on B1 again, then drag the small square at the bottom right corner of the cell down to the last row of your data. The formula copies down and checks every row. Now you can sort or filter by the TRUE values to see all your duplicates together.
Removing duplicates when you want them gone
Excel has a Remove Duplicates feature, but use it carefully — it actually deletes rows, and you cannot undo it if you close the file. Always save a backup copy first.
Select all the data you want to check, including headers if you have them. Go to the Data tab. Click Remove Duplicates. A dialog will open showing all your columns. Uncheck any columns you do not want to compare — for example, if you have a Name column and an ID column, you might want to check only the Name column. Click OK. Excel will delete every row where the checked columns match a previous row exactly.
The first occurrence of each duplicate stays; only the repeats are removed. If you realize you made a mistake, press Ctrl+Z immediately to undo, but if you have closed and reopened the file, the deleted rows are gone for good.
Finding duplicates across two different columns
Sometimes you need to know if a value from one column appears anywhere in another column — for example, checking whether customer IDs from one list exist in another list. Use COUNTIF with a different range.
Say your first list is in column A and your second list is in column C. Click on cell B1. Type =COUNTIF($C$1:$C$100,A1)>0. This returns TRUE if the value in A1 appears anywhere in column C. Press Enter and drag the formula down. Now you can see which entries from column A have a match in column C.
If you want the opposite — to find values in column A that do not appear in column C — change the formula to =COUNTIF($C$1:$C$100,A1)=0.
Why Excel might not find duplicates you expect
Excel is case-sensitive in some situations and not in others. The Conditional Formatting tool treats "John" and "john" as different values and will not flag them as duplicates. The COUNTIF function does the same. If you suspect your duplicates have mixed capitalization, convert everything to the same case first using the UPPER or LOWER function, or search manually for the variations.
Extra spaces cause the same problem. A cell with "John " (with a space at the end) will not match "John" (without the space). If you suspect this is happening, use Find & Replace to remove extra spaces: press Ctrl+H, type a space in the Find field, leave the Replace field empty, and click Replace All.
Dates and numbers that look the same might be stored differently — one as text and one as a number. Excel will not flag them as duplicates. If you are checking dates or numbers and getting unexpected results, click on a cell that looks like a duplicate and check the formula bar at the top to see exactly what is stored there.
Comparing two lists to find matches or differences
If you have two separate lists and need to find which entries appear in both, or which appear in only one, use a COUNTIF formula to compare them. Put your first list in column A and your second list in column C. In column B, use =COUNTIF($C:$C,A1) to check if each value from column A exists in column C. A result of 1 or higher means it exists in both lists; 0 means it only appears in column A.
For the reverse — checking which values from column C appear in column A — put the formula in column D: =COUNTIF($A:$A,C1). Now you can filter to see matches, one-way matches, or entries that appear in only one list.
Frequently Asked Questions
Can I find duplicates in multiple columns at the same time?
Yes, but Excel treats each column separately. If you select columns A and B together and use Conditional Formatting, it will highlight duplicates within column A and duplicates within column B, but not rows where column A matches column B. To find rows where all selected columns match a previous row, use the Remove Duplicates feature instead.
What if I want to keep one copy of each duplicate and delete the rest?
Use Remove Duplicates. It keeps the first occurrence of each value and deletes all repeats. Make sure you have a backup before you do this, because you cannot undo it after you close the file.
How do I find duplicates if my data is in different sheets?
You cannot use Conditional Formatting or Remove Duplicates across sheets. Copy one list to a temporary column in the same sheet as the other, then use COUNTIF to compare them. For example, paste your second list into column D, then use =COUNTIF($D:$D,A1) in column B to check if each value from column A exists in column D.
Why does Excel say there are duplicates when the values look identical?
Check for extra spaces at the beginning or end of cells, mixed uppercase and lowercase letters, or numbers stored as text instead of numbers. Click on a cell that looks like a duplicate and look at the formula bar to see the exact content. Use Find & Replace to clean up spaces, or the TRIM function to remove them automatically.
Can I highlight duplicates in a specific color?
Yes. When you use Conditional Formatting and the Duplicate Values dialog opens, click the dropdown next to the color preview and choose a different color before you click OK. You can also use the dropdown to pick a different formatting style, like bold text or a different background color.