How to Delete Duplicate Entries in Excel

How-to basics · Updated November 20, 2026

To delete duplicate entries in Excel for Microsoft 365 on Windows, select the full data range, choose Data > Remove Duplicates, select the columns Excel should compare, and click OK. Excel keeps the first matching entry and removes later ones, so make a copy of your data first and check which columns define a duplicate before continuing.

This tool is useful for cleaning lists of customers, products, orders, or other records. The key decision is whether a duplicate means the same value in one column or the same combination of values across several columns. Choosing the wrong comparison columns can remove useful records along with the repeats.

What You’ll Need

  • An Excel workbook containing the list you want to clean.
  • A clear idea of what counts as a duplicate, such as the same email address or the same combination of name and date.
  • A backup copy of the workbook or an untouched copy of the original data on another worksheet.
  • Column headings, if available, to make the comparison options easier to identify.

Step-by-Step

  1. Save a copy before editing. Use File > Save As to create a working copy, or duplicate the worksheet by right-clicking its sheet tab and choosing Move or Copy, then selecting Create a copy. This matters because Remove Duplicates changes the selected data directly. You can undo the change immediately with Ctrl+Z on Windows, but undo may not be available after closing the workbook or making other changes.
  2. Check the shape of your list. Make sure the records form a continuous block with one header row and no unrelated notes or totals inside it. If your list has associated information in several columns, such as a customer name, email, and phone number, plan to include all those columns in the selection. Removing duplicate values from just one column can delete entire rows and the details stored beside them.
  3. Select the data to clean. Click a cell in the list. Excel often detects the connected range automatically when you open the duplicate-removal command. For greater control, select the complete range, including every column that belongs to the records and the header row. If the list is an Excel table, click a cell inside the table. Do not select only the column whose values look duplicated unless you are certain the other row data should be deleted with it.
  4. Open the duplicate-removal tool. On the ribbon, select Data > Remove Duplicates. In the dialog box, check My data has headers if the first row contains labels such as Email or Order ID. Leave it unchecked if the first row is a real record. Incorrectly setting this option can cause Excel to treat a record as a heading or a heading as data.
  5. Choose how Excel should identify repeats. In the list of columns, select the fields that together define a duplicate. To keep only one record per email address, select only the Email column. To remove repeated complete records, select every column in the list. For example, if two rows have the same name but different email addresses, selecting Name alone treats them as duplicates; selecting both Name and Email keeps both rows.
  6. Confirm the selected range and columns. Read the column labels in the dialog carefully. If the wrong columns appear, cancel the dialog and select the correct range before opening it again. If Excel asks whether to expand the selection, choose Expand the selection when related columns must stay attached to their records. Choosing to continue with only the selected cells can separate cleaned values from the rest of the row.
  7. Remove the duplicates. Click OK. Excel compares the selected columns, keeps the first occurrence it encounters, and removes later rows that match according to those columns. A results message reports how many duplicate values were found and removed, and how many unique values remain. Click OK to close the message.
  8. Review the cleaned list. Check several records near the top, middle, and bottom of the range, especially records that share some but not all of the selected fields. Confirm that the intended version of each record was kept and that associated values remain in the same row. If the result is wrong, use Ctrl+Z immediately on Windows, or Command+Z on Mac, and repeat the process with a corrected selection.

Mac and web notes: In Excel for Mac, the command is also on the Data tab, though ribbon layout can vary by version. The undo shortcut is Command+Z. Excel for the web also provides a Remove Duplicates command on the Data tab, but the dialog or ribbon may look different from the Windows desktop app. If you cannot find the command, widen the window or look for it in the Data tab’s data tools.

Common Mistakes

  • Selecting only one column by accident. Excel removes whole rows from the selected data range when it finds matches. If you selected a single field while intending to compare complete records, details in other columns may be lost with the removed rows. Select the whole record range first, then choose the comparison columns inside the dialog.
  • Choosing too few or too many comparison fields. Selecting only First Name can collapse different people with the same name. Selecting every column can leave rows that look like duplicates if a date, note, or other field differs. Define the rule before running the command: identify the field that uniquely determines a record, or select all fields for exact row matching.
  • Assuming Excel keeps the newest or best record. It keeps the first matching row in the selected range, not necessarily the most recent, complete, or accurate one. Sort the data into the order you want before removing duplicates, or review and choose the preferred record manually first. Keep a backup so you can restore records if needed.
  • Forgetting the header setting. If the list has column headings, check My data has headers. If it does not, leave the option unchecked. A wrong setting may skip the first real record or include a heading in the comparison.
  • Including unrelated cells. Selecting a title, totals row, blank separator, or notes outside the data can confuse the range Excel uses. Keep the selection limited to the actual records and their headings. If your data is an Excel table, clicking inside it is often a convenient way to start.
  • Expecting visual differences to control matching. Cell color, font, and borders are not what define duplicate records in this dialog. Conversely, extra spaces or slightly different text can prevent values that look similar from matching. Clean inconsistent text or inspect the underlying values before running the tool.

Tips

  • Use a unique identifier when possible. Email address, product code, or order number is often a safer comparison field than a person’s name. If an identifier is not unique on its own, select the combination that represents one record, such as Order ID and Line Item.
  • Sort first if the retained copy matters. Because the first matching row is kept, sort by a useful field before removing duplicates. For example, sort by a date column so the row you want to retain appears first. Verify the sort order and the records afterward rather than assuming Excel chose the preferred version.
  • Use a table for a changing list. Select the data and choose Home > Format as Table to make a table, confirming whether it has headers. Tables make it easier to work with a defined set of records and can expand when new rows are added. Removing duplicates still deletes records, so keep a backup.
  • Try highlighting before deleting. If you are unsure which rows match, use Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values to highlight repeated values in a selected column. This can help you inspect candidates first, but it highlights repeats in that selection; it does not verify that all the other fields in a row are identical.
  • Check for hidden spaces and inconsistent text. Entries such as an email with a trailing space may not match the same email without that space. Look at suspicious values in the formula bar, or clean the data on a copy before removing duplicates. Also decide whether differences in punctuation, abbreviations, or spelling should count as distinct entries.
  • Remember that the operation is a one-time cleanup. If you paste new data into the list later, Excel will not automatically remove new duplicates. Run the command again after adding records, or use a repeatable data-cleaning process if the list is refreshed regularly.

Troubleshooting

The command is unavailable or does not appear: Click inside the worksheet data and select the Data tab. If the ribbon is collapsed or the window is narrow, expand the ribbon or look for the command in the tab’s overflow area. In a protected worksheet, editing tools may be restricted; if you have permission, use Review > Unprotect Sheet and try again. A workbook opened in a limited viewing mode may also need to be saved or opened for editing.

Excel removed more rows than expected: Undo at once with Ctrl+Z on Windows or Command+Z on Mac. Then restore the original range if needed and rerun the command with more comparison columns. If you already made further edits and undo would remove them, return to the backup copy instead. Do not save over your only copy until you have checked the results.

Duplicates remain: Check that the repeated rows match across every column you selected. A difference in one selected field means Excel treats the rows as different. Look for leading or trailing spaces, alternate spellings, hidden characters, or different values that merely look alike because of number formatting. If the comparison should be based on fewer fields, reopen the dialog and select only those fields.

The wrong version of a record remains: Undo the removal, sort the range so the preferred record comes before its matches, and run Remove Duplicates again using the same comparison fields. Alternatively, review each group manually and delete the unwanted rows. Excel does not provide a setting in this dialog to keep the newest matching row automatically.

Rows no longer line up: This can happen if you chose to continue with the current selection instead of expanding it to include related columns. Undo, select the complete range, and repeat the process. Check that every field belonging to a record is included in the data selection, even if only some fields are selected as comparison criteria.

Frequently Asked Questions

Does Remove Duplicates delete every copy of a repeated entry?

No. It keeps the first matching row in the selected range and deletes subsequent matches. If you need to retain a different copy, sort the records so that copy comes first, or decide which row to keep before running the tool.

Can I remove duplicates based on one column while keeping the other columns?

Yes. Select the full data range so each record stays together, then select only the relevant field in the Remove Duplicates dialog. Excel uses that field to find matches and removes the later matching rows, including their associated data in the other selected columns.

Can I remove rows only when every column is identical?

Yes. Select the full range and check every column in the dialog. Excel then removes later rows that match across all selected fields. If one selected value differs, Excel treats the rows as distinct.

Does Excel distinguish uppercase and lowercase text?

Remove Duplicates generally treats text that differs only by capitalization as a duplicate. If capitalization must define separate entries in your workflow, check the records carefully or use a more tailored method rather than relying on this command alone.

Can I undo duplicate removal?

Usually, yes, immediately after the operation: press Ctrl+Z on Windows or Command+Z on Mac. Undo is not a dependable recovery plan after you close the workbook or make other changes, so save a backup before deleting records.

Will new duplicates be removed automatically?

No. The command cleans the selected data at that moment; it does not set up ongoing duplicate prevention. Run it again after adding or importing more rows, and review the comparison columns each time.

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.