How to spot duplicates in Excel
Excel has a built-in tool that highlights duplicate values so you can see them without manually scanning thousands of rows. The fastest way is to select the column or range where duplicates might exist, then use the Conditional Formatting feature to mark them visually. This works whether you have 50 entries or 50,000.
Start by clicking the column header to select the entire column, or click and drag to select just the range you want to check. Then go to the Home tab at the top, find Conditional Formatting (usually on the right side of the ribbon), and click the dropdown arrow next to it. Choose "Highlight Cell Rules" and then "Duplicate Values". Excel will immediately color every duplicate entry in that range, making them impossible to miss.
If you want to remove the highlighting later, go back to Conditional Formatting, click "Clear Rules", and choose whether to clear from the selected cells or the entire sheet. The duplicates stay in your spreadsheet — this method only marks them so you can decide what to do with them.
Key Takeaways
- Select your data range, then use Conditional Formatting > Highlight Cell Rules > Duplicate Values to color all matching entries instantly.
- The Remove Duplicates feature deletes duplicate rows permanently, keeping only the first occurrence of each value.
- Use the COUNTIF function to count how many times each entry appears, which helps you spot patterns in your data.
- Always save a backup copy of your spreadsheet before removing duplicates, since deletion cannot be undone.
Removing duplicates permanently
If you want to delete duplicate rows rather than just highlight them, Excel has a separate tool for that. Select the range containing your data (including headers if you have them), go to the Data tab, and look for "Remove Duplicates" on the right side of the ribbon. Click it, and a dialog box will appear asking which columns to check.
By default, Excel selects all columns in your range. If you want to check for duplicates based on only one or two columns instead of the entire row, uncheck the columns you want to ignore. For example, if you have a list of customer names and phone numbers, you might uncheck the phone number column so Excel only removes rows where the name is identical, even if the phone number differs.
Click OK, and Excel removes every duplicate row it finds, keeping only the first occurrence of each entry. The deleted rows are gone permanently, so make sure you have saved a backup copy of your spreadsheet first. If you make a mistake, you can undo the deletion by pressing Ctrl+Z immediately, but once you close the file, the undo history is lost.
Using COUNTIF to find how many duplicates you have
Sometimes you need to know not just where duplicates are, but how many times each entry appears. The COUNTIF function counts how many times a value shows up in a range, which is useful for spotting patterns or understanding the scope of your duplicate problem.
In an empty column next to your data, type a formula like =COUNTIF($A$2:$A$100,A2), replacing A2:A100 with your actual data range. The dollar signs lock the range so it does not change when you copy the formula down. Press Enter, then drag the formula down to every row in your list. Each cell will now show how many times that entry appears in the entire range.
If a cell shows 1, that entry is unique. If it shows 2 or higher, you have duplicates. This method is especially helpful when you want to keep some duplicates but remove only the ones that appear more than a certain number of times, or when you need to report how many duplicates exist before deciding whether to delete them.
Filtering to see only duplicates
Another way to work with duplicates is to filter your data so only the duplicate entries show on screen. First, highlight your entire data range including headers. Go to the Data tab and click "AutoFilter". Small dropdown arrows will appear in each header cell.
If you have already used Conditional Formatting to color duplicates, you can click the dropdown arrow in any column and uncheck "No Color" to show only the colored (duplicate) rows. This hides all the unique entries temporarily, so you can review and delete duplicates without seeing the rest of your data. When you are done, click the dropdown again and select "All" to show everything again.
This approach is slower than the Remove Duplicates tool if you want to delete everything at once, but it gives you a chance to review each duplicate before deciding whether to keep it. It is especially useful when some duplicates might be legitimate — for example, if two customers happen to have the same name, you would not want to delete one of them.
Handling duplicates across multiple columns
Sometimes you need to find rows where multiple columns match, not just one. For example, you might have a customer list where the same person appears twice with slightly different spelling in the name column but the same email address. In this case, you want to check for duplicates based on the email column specifically, not the name.
When you use the Remove Duplicates tool, you control which columns it checks. Select your data, open Remove Duplicates, and uncheck every column except the one you want to base the duplicate check on. If you want to check multiple columns together — for example, remove rows where both the name AND email are identical — leave both columns checked and uncheck the rest.
If you want to see which rows are duplicates without deleting them, use Conditional Formatting on just the column that matters. Select only that column, apply Duplicate Values highlighting, and you will see which entries repeat in that specific column while leaving your other data untouched.
What to do before removing duplicates
Before you delete anything, take two precautions. First, save a backup copy of your spreadsheet with a different filename — something like "Customer List - Backup" — so you have the original data if something goes wrong. Second, sort your data by the column you are checking for duplicates. This makes it easier to spot patterns and understand what you are about to delete.
If your spreadsheet has formulas that reference rows you are about to delete, those formulas will break. Check whether any other sheets in your workbook pull data from the rows you plan to remove. If they do, you may need to copy the values from those formulas and paste them as numbers before deleting the rows, so the dependent sheets do not show errors.
Take a moment to think about whether you actually want to delete duplicates or just hide them. If you are not sure, use Conditional Formatting to highlight them first and live with the colored cells for a few days. Once you are confident the duplicates are truly unwanted, then use Remove Duplicates.
Frequently Asked Questions
Can I undo removing duplicates after I close the file?
No. Once you close your spreadsheet, the undo history is erased and you cannot recover deleted rows. This is why saving a backup before removing duplicates is essential. If you realize you deleted the wrong rows after closing the file, you will need to restore from your backup copy.
Will removing duplicates affect formulas in other sheets?
Yes. If another sheet contains a formula that references a row you delete, that formula will show an error. Before removing duplicates, check whether any other sheets depend on the rows you plan to delete. If they do, copy those cells and paste them as values first so the dependent formulas do not break.
How do I find duplicates if my data has headers?
When you select your range for Remove Duplicates, include the header row. Excel will ask whether your data has headers — click yes. Excel will then ignore the header row when looking for duplicates, so it will not accidentally treat your column names as data.
Can I highlight duplicates in one color and unique entries in another?
Yes. Use Conditional Formatting twice. First, highlight duplicates with one color using Duplicate Values. Then create a second rule using a formula like =COUNTIF($A$2:$A$100,A2)=1 to highlight cells that appear only once, and choose a different color. This gives you a clear visual of both duplicates and unique entries.
What if I only want to remove duplicates from certain columns, not the whole row?
The Remove Duplicates tool deletes entire rows, not individual cells. If you only want to remove duplicate values from specific columns while keeping the rest of the row, use Conditional Formatting to identify them, then manually delete the duplicate cells or use a filter to hide them instead of deleting the rows.