If you need to clear duplicates in Excel, you can remove repeated rows in a few clicks, highlight them before making changes, or use a formula to find them. The best method depends on what you consider a duplicate: an identical value in one column, or a row where several columns match. Before deleting anything, save a copy of your workbook so you can restore the original data if needed.
This guide explains how to remove duplicates in Excel, check which entries are repeated, and choose the right approach for your spreadsheet. The steps work in most recent versions of Excel for Windows, Mac, and the web, although menu locations may vary slightly.
What Does Excel Count as a Duplicate?
A duplicate is an entry that matches another entry according to the columns you select. For example, a list may contain the same email address twice, even if the person’s name or department differs. Alternatively, you might want to treat two rows as duplicates only when the name, email address, and department all match.
This distinction matters because Excel’s Remove Duplicates command compares the columns you select. If you select only the Email column, Excel can remove rows with repeated email addresses. If you select every column, it removes only rows that match across all selected columns.
- One-column match: Remove or identify repeated values in a single field, such as product ID or email address.
- Multi-column match: Treat records as duplicates only when the selected fields match together.
- Exact row match: Compare every column in the table to find fully identical rows.
Decide which fields define a duplicate before using a removal tool. Otherwise, you may delete valid records or leave unwanted repeats behind.
How to Remove Duplicates in Excel with Remove Duplicates
The quickest way to clear duplicate rows is Excel’s built-in Remove Duplicates command. It deletes repeated records from the selected range and keeps the first occurrence of each matching entry. The remaining rows retain their original order.
- Select a cell inside your data range. You can also select the full range you want to check.
- Open the Data tab on the ribbon.
- Choose Remove Duplicates. In some versions, this command appears in the Data Tools group.
- If your data has column headings, select My data has headers.
- Check the columns Excel should use to identify duplicates.
- Click OK and review the confirmation message, which reports how many duplicates were removed and how many unique values remain.
For example, suppose a customer list has columns for Name, Email, and City. To keep only one record per email address, select Email and clear the checkboxes for Name and City. Excel compares the email values and removes later rows with a repeated email, along with the other information on those rows.
To remove only completely repeated rows, select all relevant columns. Excel then removes a row only when its values match another row across those columns.
Important: Remove Duplicates changes the data directly. It does not simply hide duplicate rows, and Excel generally does not provide a convenient way to restore the original data after you close the workbook. Save a backup first, especially when working with important records.
How to Highlight Duplicates Before Deleting Them
If you want to review repeated values before removing them, use Conditional Formatting. This method marks duplicates visually without deleting any data. It is useful when you need to check whether two similar entries are truly redundant.
- Select the cells or column you want to inspect.
- Go to Home and choose Conditional Formatting.
- Select Highlight Cells Rules, then choose Duplicate Values.
- Choose a formatting style, such as a colored fill, and click OK.
Excel highlights values that appear more than once in the selected range. You can then sort or filter by color, investigate the marked records, and decide whether to remove them. If you select several columns together, the duplicate-value rule may evaluate the selected cells rather than identify entire records in the way you intend. For whole-row comparisons, a formula or Remove Duplicates with the appropriate columns is often clearer.
How to Find Duplicates with a Formula
Formulas are helpful when you want a repeatable check, need a label beside each record, or want to keep the original data intact. They can also make duplicate checks easier to audit because the result updates when your data changes.
To check for duplicates in column A, enter this formula in B2 and fill it down:
=IF(COUNTIF($A$2:A2,A2)>1,"Duplicate","First occurrence")
This formula counts how often the current value has appeared from the first data row through the current row. The first occurrence is labeled “First occurrence”; later appearances are labeled “Duplicate.” Filter column B to show only duplicate rows. Because the formula checks from the top down, it identifies later repeats rather than labeling every copy as a duplicate.
In Excel 365 or Excel 2021, you can also use COUNTIF to flag every value that appears more than once:
=IF(COUNTIF($A$2:$A$100,A2)>1,"Duplicate","Unique")
Replace the range with the actual size of your list. This version labels all copies of a repeated value, including the first one. If your data is formatted as an Excel Table, structured references can make formulas easier to read and maintain.
To check whether a combination of two fields is repeated, use COUNTIFS. For example, if names are in column A and departments are in column B, enter this in C2 and fill down:
=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)>1,"Duplicate","First occurrence")
This labels a row as a duplicate when the same name-and-department combination has already appeared above it. Add more criteria pairs to the formula if a record is defined by additional fields, such as name, department, and location.
How to Remove Duplicate Rows with a Formula
In newer Excel versions, the UNIQUE function can return a list without duplicates while leaving the source data untouched. Enter a formula in an empty area, such as:
=UNIQUE(A2:C100)
Excel returns the distinct rows from the selected range and updates the results when the source values change. To return unique values from one column, use a one-column range, such as =UNIQUE(A2:A100). This is useful for creating a clean report or a distinct list without deleting anything from the original data.
The UNIQUE function is available in Microsoft 365 and newer perpetual versions such as Excel 2021. In older versions, you can use Remove Duplicates, Advanced Filter, or a helper-column formula instead. Note that UNIQUE creates results in a separate location; it does not clean the original range.
How to Use Advanced Filter to Copy Unique Records
Advanced Filter can extract unique records to another location, which is useful when you want a clean copy while preserving your source list.
- Make sure your data has a header row, then select the range or click inside it.
- Open the Data tab and choose Advanced in the Sort & Filter group.
- Choose Copy to another location.
- Confirm the list range and enter a destination in the Copy to box.
- Select Unique records only, then click OK.
Advanced Filter copies unique rows based on the selected list range. It does not remove duplicates from the source. The copied results are a snapshot, so they do not automatically update when the source data changes.
How to Remove Duplicates with Power Query
Power Query is a strong option for large datasets or a process you need to repeat. It can import, clean, and refresh data while keeping the original source separate from the cleaned results.
- Select a cell in your data and choose Data > From Table/Range. If prompted, confirm that your table has headers.
- In the Power Query Editor, select the column or columns that define a duplicate.
- Choose Home > Remove Rows > Remove Duplicates.
- Select Close & Load to return the cleaned results to Excel.
When you refresh the query, Excel can apply the same cleanup steps to updated source data. Before using this method, confirm that the correct columns are selected: Power Query will treat rows as duplicates based on those columns. The order of retained records can depend on the query’s sorting and transformation steps, so sort the data first if you need a particular record to be kept.
Common Issues When Clearing Duplicates
If Excel does not find duplicates you expected—or removes records you wanted to keep—check the data and your comparison settings. Small differences can make two entries count as separate values.
-
Extra spaces: “North” and “North ” may not match. Use
TRIMin a helper column to remove leading, trailing, and repeated spaces. - Different formatting: Values that look alike may be stored differently, such as numbers stored as text. Standardize the column before checking.
- Different punctuation: A phone number with parentheses or hyphens may not match the same number without them.
- Wrong columns selected: If you select too few fields, Excel may delete records that share one value but differ in other important details.
- Headers not recognized: Check the “My data has headers” option so Excel does not treat your heading row as a record.
- Blank cells: Decide whether blank entries should be treated as repeated values or left alone. Consider filtering blanks before removing duplicates.
Excel’s duplicate tools are generally not case-sensitive for ordinary text comparisons, so entries such as “ABC” and “abc” may be treated as the same. If capitalization matters to your data, use a case-sensitive formula or a carefully designed Power Query process rather than relying on the standard Remove Duplicates command.
Which Excel Duplicate Removal Method Should You Use?
Choose a method based on whether you want to delete data, review it, or create a reusable clean result:
- Use Remove Duplicates for a fast, permanent cleanup of a copied or backed-up range.
- Use Conditional Formatting when you want to inspect duplicates before deciding what to delete.
- Use formulas to flag repeats, apply custom comparison rules, or keep an auditable source list.
- Use UNIQUE to generate a live list of distinct values or rows in supported Excel versions.
- Use Advanced Filter to copy unique records to another area without changing the source.
- Use Power Query for large datasets or repeatable cleanup that can be refreshed.
Conclusion
To clear duplicates in Excel, select your data and use Data > Remove Duplicates, making sure the chosen columns match your definition of a duplicate. If you need to review entries first, highlight them with Conditional Formatting or flag them with a formula. For a separate or refreshable clean list, consider UNIQUE, Advanced Filter, or Power Query.
Always save a copy before deleting records, and verify the results afterward. Choosing the right comparison columns is the key to removing unwanted repeats without losing valid data.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.