How to Delete Duplicate Data in Excel

How-to basics · Updated November 20, 2026

To delete duplicate data in Excel, select a cell in your list, go to Data > Remove Duplicates, choose the columns that define a duplicate, and select OK. Excel keeps the first matching row and removes later ones, so make a copy of your data first if you may need to restore the original.

What You’ll Need

  • An Excel workbook with the data you want to clean. These steps are for Microsoft Excel for Microsoft 365 on Windows.
  • A clear idea of what counts as a duplicate. Decide whether rows must match in every column or only in specific columns, such as email address or product ID.
  • A backup or an untouched copy of the data, especially if the list contains important records. You can copy the worksheet or duplicate the workbook before making changes.

Step-by-Step

  1. Check the data and decide what a match means. Look at the column headings and sample rows before removing anything. For example, two customer rows with the same email address may be duplicates even if their phone numbers differ. But two product rows with the same name may be legitimate if their product codes differ. The columns you select in the Remove Duplicates dialog determine which rows Excel treats as matches.
  2. Make a safe copy. To preserve the original, right-click the worksheet tab and choose Move or Copy, select Create a copy, and click OK. You can also save a separate copy of the workbook with File > Save As. This is safer than relying on Undo, particularly if you will continue editing after the cleanup.
  3. Select a cell in the data. Click any cell inside the list or Excel table. If your list is a normal range, make sure it has a single header row and no completely blank rows or columns breaking it into separate blocks. If you prefer, select the full range of columns and rows you want Excel to process. Avoid selecting unrelated notes or other data beside the list.
  4. Open the duplicate-removal tool. On the ribbon, choose Data > Remove Duplicates. Excel opens a dialog listing the columns in the selected range. If the range has headers, make sure My data has headers is checked; otherwise, Excel may treat the first data row as a heading and exclude it from the comparison.
  5. Choose the columns Excel should compare. To remove only rows that match across the whole record, leave every relevant column checked. To find repeats based on one field, such as email address, clear Select All and check only the Email column. Excel will then remove later rows with a matching email, even if other cells in those rows contain different information. Use this option only when that field is a reliable unique identifier or you have reviewed what will be discarded.
  6. Confirm the removal. Select OK. Excel removes later rows that match the selected columns and keeps the first occurrence in the current row order. A message reports how many duplicate values were removed and how many unique values remain. Read the message, then check the list to confirm the result makes sense.
  7. Review the cleaned data before saving. Check several rows where duplicates existed, including the first occurrence Excel kept. Confirm that the correct columns were used, that important details were not lost, and that totals or dependent formulas still make sense. Save the workbook only after you are satisfied with the result.

The command removes entire rows from the selected range or table; it does not just clear the repeated cell. If you selected only the Email column in a multi-column list, for instance, Excel still removes the other cells in each later matching row. This is why checking the chosen columns and keeping a backup matter.

Common Mistakes

  • Choosing too few columns. If you compare only a person’s name, Excel may remove a second person with the same name but different contact details. Select the combination of fields that truly identifies a duplicate, or review the matching records manually first.
  • Choosing too many columns. If the goal is one record per email address, comparing every column may leave repeated email addresses in place when a phone number or address differs. Choose only the fields that define the match for your task.
  • Forgetting the header setting. If My data has headers is not checked for a list with headings, Excel can include the headings as data. If it is checked when the first row is actually a record, that record may be excluded from the comparison.
  • Assuming Excel keeps the newest or best row. It keeps the first matching row in the current order; it does not judge which entry is most complete or recent. Sort or review the records first if you need a particular version to remain.
  • Running the command on a partial selection. A selection that omits a column can produce a different comparison from the one you intended. Confirm that the selected range includes all the records and fields you need to evaluate.

Tips

  • Use a stable identifier where possible. An account number, order ID, or email address is usually a better comparison field than a name, which may be shared by different people or entered inconsistently.
  • Standardize data before comparing it. Extra spaces, inconsistent abbreviations, and different spellings can make records look different to Excel. For example, check whether a value has a leading or trailing space before deciding that two records are unique. If the list is important, clean a copy and compare the results before removing rows from the original.
  • Sort before removal when a particular row should remain. Since Excel keeps the first occurrence, sort by a useful column such as Last Updated so the version you want to keep appears first. Check the sort order carefully, and avoid sorting just one column in a way that separates values from their related row data.
  • Use conditional formatting for a preview. To inspect repeats rather than delete them immediately, select the cells in a key column and choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. This highlights repeated values in that selection; it does not remove rows or determine whether entire records are duplicates.
  • Remember that duplicate removal is not a live rule. Excel removes rows that are duplicates at the time you run the command. If you add or import more data later, run the tool again or use a repeatable cleanup process.

Troubleshooting

  • Excel says it found no duplicates. Recheck the selected columns and the size of the selection. The rows may differ in one of the checked fields, even if the difference is hard to spot. Look for spaces, punctuation, inconsistent codes, or a different date or number value. If only one field should determine a match, try checking just that field on a copy of the data.
  • Excel removed records that should have stayed. If you have not made other changes, use Ctrl+Z on Windows immediately. On a Mac, use Command+Z. If Undo is no longer available or you have continued working, restore the backup. Then repeat the process with more appropriate comparison columns. Do not assume sorting or filtering can bring deleted rows back.
  • The wrong row was kept. Restore the original or undo the operation, sort the records so the preferred entry comes first, and run Remove Duplicates again with the same comparison fields. Check that the sort includes the entire dataset, not just one column.
  • The first row or headings seem to be missing. Reopen the process on the original or a restored copy and check My data has headers. If your list has multiple heading rows, remove or reposition the extra headings so the data has one clear header row before running the command.
  • The command is unavailable or the result looks incomplete. Confirm that the workbook is editable and that the selection contains the intended data. If the list is filtered, hidden rows or separate blocks can make it harder to verify what was processed. Clear filters or work on a copy with the full list visible, then check the resulting row count and sample records.

Frequently Asked Questions

Does Remove Duplicates keep the first or last row?
It keeps the first occurrence in the current order and removes later matching rows. If you need the newest or most complete entry, arrange the rows so that entry appears first before removing duplicates.

Can I remove duplicates based on one column only?
Yes. In the dialog, clear Select All and check the one column that defines a match. Excel removes the entire later row when that column repeats, so other values in the removed row go with it.

Can I remove only exact duplicate rows?
Yes. Leave all the columns that make up the record checked. Excel will remove later rows that match across those selected fields, while rows with a different value in a checked field remain.

Does Excel distinguish uppercase and lowercase?
Do not rely on letter case to keep records separate. If capitalization is meaningful in your data, review and standardize the values in a copy, then verify the results before removing rows.

Can I undo duplicate removal?
Usually, you can use Ctrl+Z immediately on Windows or Command+Z on a Mac. Undo may not be available after other actions or after closing the workbook, so make a backup before removing records.

Will new duplicates be removed automatically?
No. Remove Duplicates performs a one-time cleanup. Run it again after adding new records, and confirm that the same columns still define a duplicate for the updated list.

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.