Remove Duplicates in Excel: Steps, Checks, and Safe Options

How-to basics · Updated November 3, 2026

Remove Duplicates in Excel: Steps, Checks, and Safe Options

Yes. In Excel for Microsoft 365 on Windows, select your data, choose Data > Remove Duplicates, select the columns that define a duplicate, and click OK. Excel keeps the first matching record in the current order and removes the later matching rows, so check your data and save a copy first if the records matter.

What Excel’s Remove Duplicates command does

Remove Duplicates is a data-cleanup command, not just a way to hide repeated values. It compares the selected columns in each row and deletes rows it identifies as duplicates. If you compare a customer list using email address alone, for example, Excel keeps the first row for each email and removes later rows with that same email—even if the names or other details differ.

If you select several columns as the comparison criteria, a row is considered a duplicate only when its values match the other selected columns. For example, selecting First Name and Last Name means two people named Alex Kim may be treated as duplicates even if their email addresses differ. Add Email or another identifying field to the comparison if those records should remain separate.

The command keeps the first occurrence according to the order of the rows; it does not decide which record is most complete or most recent. Sort the data first if you want a particular record to be kept. For instance, sort by a Last Updated column from newest to oldest before removing duplicates based on a customer ID. Keep in mind that this changes the row order, so check that sorting the full table is appropriate.

Check the data before deleting rows

Make a copy of the worksheet or workbook before a large cleanup. You can also duplicate the worksheet by right-clicking its tab and choosing Move or Copy, then selecting Create a copy. This gives you a reference if you later discover that two records were not truly interchangeable. Excel’s Undo command can reverse the operation immediately, but it is not a substitute for a backup if you continue editing or close the file.

Before using the command, check these details:

  • Select the complete table. Include every column that belongs to the records. Removing duplicate entries from only one selected column can leave names, dates, or other fields misaligned with their original rows if you choose to continue with the current selection.
  • Confirm whether the first row is a header. Column labels such as Customer ID or Date should not be compared as data. The dialog includes a My data has headers option; set it to match the selected range.
  • Choose a meaningful identifier. A repeated product name might be legitimate if the products have different sizes or item numbers. Decide what makes two records the same before selecting columns.
  • Check for inconsistent text. Extra spaces, spelling variations, and inconsistent formatting can make records that look similar behave differently. Clean or standardize the data first if those variations should count as the same value.

Remove duplicates in Excel step by step

  1. Click a cell inside the data range. If Excel does not identify the full table correctly, select the whole range yourself, including all fields you want to keep together.
  2. On the Windows ribbon, choose Data > Remove Duplicates. The command is in the Data Tools group.
  3. In the dialog, confirm My data has headers. Review the list of column names and check only the columns Excel should use to decide whether records match. Use Select All or Unselect All if that makes the choices easier to review.
  4. Click OK. Excel reports how many duplicate values it removed and how many unique values remain. Review the resulting rows rather than assuming that every removed record was unwanted.

For example, suppose a table has columns Customer ID, Name, and Email. To remove repeat records only when the entire record is identical, check all three columns. To keep one row per Customer ID even when names or emails differ, check only Customer ID—but first decide whether keeping the first row is the right outcome. If you need to combine information from repeated records rather than discard rows, use a review or merge process instead.

In Excel for Mac, the command is also available from the Data tab as Remove Duplicates, though ribbon placement and dialog appearance can vary by release. Excel for the web also provides a Remove Duplicates command on the Data tab; check the selected range and column choices in its dialog before confirming. To undo a recent removal on Windows, press Ctrl+Z; on Mac, press Command+Z. Do this before making other changes that you need to keep.

Choose the right columns for matching

The most important choice is whether duplicates mean repeated values in one field or repeated combinations of fields. Comparing just an email address can be useful for finding repeated contacts, while comparing every column is better for removing rows that are fully repeated. Neither choice is universally correct: it depends on what a row represents in your workbook.

Consider a sales table with Date, Order Number, Product, and Quantity. If an order can contain multiple products, comparing only Order Number would incorrectly label legitimate line items as duplicates. Comparing Order Number and Product may be more suitable, while adding Date or another field could be necessary if order numbers are reused. Look at a few suspected matches before applying the command to the full list.

Excel generally compares text without treating capitalization alone as a difference, but it does not automatically standardize all text. A trailing space or a spelling difference can prevent two entries from matching. Numeric values formatted differently may still represent the same number, while a number stored as text can behave differently from a numeric value in some cleanup tasks. If the results are unexpected, inspect the underlying entries and standardize them before repeating the removal on a copy.

Use a formula when you want a separate clean list

If you want to preserve the source data, use the UNIQUE function instead of deleting rows. UNIQUE is available in Excel 2021 and Microsoft 365. It returns a separate list and leaves the original cells unchanged; it is especially useful when the source may change and you want the result to update.

With names in A2:A7, enter =UNIQUE(A2:A7) in an empty cell. If the source contains Ava, Ben, Ava, Chen, Ben, and Drew in that order, the spilled result is Ava, Ben, Chen, Drew. The result includes one of each distinct name in first-seen order. Make sure the cells below the formula are empty so Excel has room to display the results.

With complete records in A2:C100, enter =UNIQUE(A2:C100) in an empty cell to return distinct rows based on the combination of values across all three columns. This does not remove duplicates from the original range. If you need a permanent cleaned table, copy the resulting spill range and use Paste Special > Values in a new location, then review it before replacing any source data.

Common problems and safer alternatives

A frequent mistake is checking too few columns. If the task is to remove fully repeated rows but only Email is selected, Excel may delete a row that has a different phone number or address. The opposite mistake is checking every column when the goal is one row per customer: small differences in an address or note then cause both records to remain. Revisit the definition of duplicate rather than repeatedly clicking the command with changing guesses.

For a non-destructive review, use Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values to highlight repeated cell values in a selected range. This highlights values, not necessarily duplicate records across multiple columns, and it does not delete anything. You can then filter or inspect the highlighted entries before deciding what to remove.

For recurring imports or larger repeatable cleanup tasks, Power Query can be more suitable. In Excel for Microsoft 365 on Windows, select the data and choose Data > From Table/Range. In the Power Query Editor, select the columns that define a duplicate, then choose Home > Remove Rows > Remove Duplicates. Load the resulting query back to Excel. The query keeps the source data separate and can be refreshed after the source changes, but check the query’s selected columns and output before relying on it.

Excel and Google Sheets are different

If by Google you mean Google Sheets, it has its own duplicate-removal tool; it is not an Excel command. In Google Sheets in a browser, select the range, then choose Data > Data cleanup > Remove duplicates. Review the header setting and columns in the dialog before confirming. The goal is similar to Excel’s command, but menu names and the app’s behavior should not be assumed to be identical. If you are working in an Excel workbook, use Excel’s Data > Remove Duplicates path instead.

Use Excel’s command for a one-time cleanup when you are confident about which records to discard. Choose UNIQUE when you need a live, separate list, Conditional Formatting when you want to inspect matches, or Power Query when the same import-cleanup process needs to be repeated. These options solve different problems: highlighting is for review, a formula is for a separate result, and removal changes the data in the selected range.

Frequently Asked Questions

Does Remove Duplicates delete the first copy?
Typically, no. Excel keeps the first occurrence in the current row order and removes later rows that match the selected columns. Sort first if a particular record should be kept.

Can I remove duplicates based on just one column?
Yes. In the Remove Duplicates dialog, select only that column. Excel then removes later rows with a repeated value in that field, so other information in those rows may be discarded too.

Can I undo removing duplicates?
Use Ctrl+Z on Windows or Command+Z on Mac immediately after the operation. If you have made further changes, or want a reliable recovery option, restore a copy of the worksheet or workbook instead.

Will Excel automatically remove duplicates I add later?
No. The command cleans the selected data at the time you run it; new rows can introduce duplicates afterward. Use a UNIQUE formula for a separate updating list, or rerun the cleanup when appropriate.

Does Remove Duplicates only highlight repeated cells?
No. It removes matching rows from the selected data. To highlight repeated cell values without deleting anything, use Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.