The fastest way to spot duplicates in Excel

Excel has a built-in tool called Conditional Formatting that highlights duplicate values automatically. Open your spreadsheet, select the cells you want to check, go to the Home tab, click Conditional Formatting, choose Highlight Cell Rules, and select Duplicate Values. Excel will instantly color every duplicate cell so you can see them at a glance.

If you need a list of just the duplicates rather than highlighted cells, you can use the COUNTIF function to identify which values appear more than once. This method works best when you want to filter or sort your data to see only the duplicates, or when you need to count how many times each value repeats.

The method you choose depends on what you plan to do next — whether you want to delete duplicates, move them somewhere else, or just see which ones exist. Both approaches take less than a minute to set up.

Key Takeaways

  • Conditional Formatting is the quickest way to highlight all duplicates in a selected range with color.
  • The COUNTIF function lets you create a helper column that marks which values appear more than once.
  • Excel's Remove Duplicates feature deletes duplicate rows entirely, keeping only the first occurrence of each value.
  • Always copy your data to a backup sheet before removing duplicates, because the deletion cannot be undone.
  • Filtering by color after highlighting duplicates makes it easy to work with only the duplicate cells.

Using Conditional Formatting to highlight duplicates

Conditional Formatting is the simplest method because it requires no formulas and works on any size dataset. Start by clicking the column header or selecting the range of cells you want to check. If you want to check column A, click the A at the top. If you want only cells A2 through A100, click A2 and drag to A100, or click A2 and then Shift+Click A100.

Once your cells are selected, go to the Home tab at the top of the ribbon. Click the Conditional Formatting button — it looks like a small chart icon. A dropdown menu will appear. Hover over Highlight Cell Rules and click Duplicate Values. A dialog box opens with two options: Format only or Format only unique. Leave it set to Format only (which means format the duplicates), choose a color from the dropdown, and click OK.

Excel now colors every cell that contains a value appearing more than once in your selection. If the same name appears three times, all three cells get colored. If a value appears only once, it stays uncolored. You can now see at a glance which entries are repeated.

Creating a helper column with COUNTIF to identify duplicates

The COUNTIF method is useful when you want a formula that marks duplicates so you can sort or filter by them later. Click on an empty column next to your data — if your data is in column A, use column B. Click the first cell in that column (B1 if your data starts in A1) and type this formula: =COUNTIF($A$1:$A$100,A1). Replace A1:A100 with the actual range of your data.

Press Enter. The cell now shows a number — 1 if that value appears once, 2 if it appears twice, 3 if it appears three times, and so on. Any number higher than 1 means that cell contains a duplicate. Now click that cell again and copy the formula down to match all your data rows. Click the cell with the formula, then double-click the small square at the bottom right corner of the cell to auto-fill the formula down the entire column.

Now you can sort or filter by this helper column. Click any cell in your data range, go to the Data tab, and click Filter. Click the dropdown arrow in your helper column and uncheck 1 to show only rows where the value appears more than once. This leaves only the duplicates visible on screen.

Using Remove Duplicates to delete duplicate rows

If you want to remove duplicate rows entirely and keep only the first occurrence of each value, use the Remove Duplicates feature. This is permanent, so first copy your data to a backup sheet or save a copy of your file. Then select all the data you want to check, including headers if you have them.

Go to the Data tab and click Remove Duplicates. A dialog box appears listing all your columns. By default, all columns are checked, which means Excel looks at the entire row — it only removes a row if every single column matches another row exactly. If you want to check only specific columns, uncheck the ones you don't need. For example, if you only care about duplicate names in column A, uncheck all other columns. Click OK.

Excel removes the duplicate rows and tells you how many it deleted. The remaining data now contains only unique rows. Remember: this action cannot be undone with Ctrl+Z if you close the file, so always keep a backup.

Filtering by color after highlighting duplicates

Once you have highlighted duplicates with Conditional Formatting, you can filter to show only the colored cells. This is helpful when you want to work with just the duplicates — to review them, move them to another sheet, or delete them one by one.

With your duplicates highlighted, go to the Data tab and click Filter. A dropdown arrow appears in the header row of each column. Click the dropdown arrow in the column with highlighted duplicates. A menu opens showing all the colors used in that column. Uncheck the blank option (which represents non-duplicate cells) and click OK. Now only the duplicate cells are visible.

You can now copy these filtered cells to another location, delete them, or review them in detail. When you are done, click the filter dropdown again and select All to show all rows again.

Checking for duplicates across multiple columns

Sometimes you need to find duplicates based on a combination of columns rather than a single column. For example, you might want to find rows where both the first name and last name match, not just the first name alone.

Create a helper column that combines the values from multiple columns. Click an empty column and type a formula like =A1&B1 to combine columns A and B, or =A1&"-"&B1 to combine them with a dash in between. Copy this formula down for all rows. Then use Conditional Formatting or COUNTIF on this helper column as you would with a single column.

This approach treats the combination as a single value, so Excel only marks a row as a duplicate if both the first and last name match together, not if just one of them repeats.

Common mistakes when finding duplicates

One frequent mistake is forgetting to include all your data in the selected range. If you select only A1:A50 but your data goes to A100, Excel only checks the first 50 rows and misses duplicates below that. Always scroll to the bottom of your data first to see where it ends, then select the full range.

Another mistake is not realizing that Excel treats spaces and capitalization as different values. "John" and "john" are not duplicates. "Smith " with a trailing space and "Smith" without one are not duplicates either. If your results seem wrong, look for extra spaces or mixed capitalization in your data.

When using Remove Duplicates, people sometimes forget to check which columns are included in the comparison. If you have columns A, B, and C selected but only want to check column A, you must uncheck B and C first. Otherwise, Excel requires all three columns to match before it considers a row a duplicate.

Frequently Asked Questions

Can I find duplicates in two different columns?

Yes. Select both columns together by clicking the first column header, then holding Ctrl and clicking the second column header. Then use Conditional Formatting as normal. Excel will highlight any value that appears more than once across both columns combined.

What if I want to keep all duplicates but just see which ones they are?

Use Conditional Formatting to highlight them, or use the COUNTIF helper column method. Both show you the duplicates without removing or changing anything. You can then review them, sort by them, or filter to see only duplicates.

Does Remove Duplicates work on filtered data?

No. Remove Duplicates works on all rows in your selection, whether they are currently visible or hidden by a filter. If you have a filter active, remove it first by going to Data and clicking Filter again to turn it off.

Can I undo Remove Duplicates after I close the file?

No. Once you close the file, the deletion is permanent. Always save a backup copy of your file before using Remove Duplicates, or use Conditional Formatting to review duplicates first before deciding to delete them.

How do I find duplicates if my data has headers?

When you select your range, include the header row. Conditional Formatting will treat the header as data and might highlight it if the header text repeats elsewhere. If this happens, you can manually exclude the header row from the formatting, or select only the data rows below the header before applying Conditional Formatting.