How to Remove Duplicate Rows in Excel Without Losing the Wrong Records

October 29, 2026

Remove duplicate rows in Excel after deciding which fields identify the same record. These steps cover desktop Excel for Windows and Excel for the web.

Keep the original and review duplicates

Copy the original table to another worksheet or workbook first. To inspect repeated values, select the relevant cells, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. Select a format and confirm.

For example, repeated customer names may be legitimate when the rows contain different orders. Decide whether your key should be an order ID, an email address, or a combination of columns before deleting anything.

Remove the matching rows

  1. Select the complete table or range you want to clean.
  2. Choose Data > Remove Duplicates.
  3. Select only the columns that define a duplicate. Choosing two columns means both values must match.
  4. Select OK and review Excel’s count of removed duplicates and remaining unique records.

Excel retains the first occurrence. When the selected key matches, it removes the entire duplicate row within the table or range, including values in columns you did not select as keys.

Verify the result

Compare several retained records with the original. Check totals and important identifiers, especially where names repeat. If the wrong rows disappeared, use Ctrl + Z immediately and revise the key before trying again.

If your data has outlines or subtotals, remove those before using Remove Duplicates. For a visual review workflow, see our Excel conditional formatting guide.

Sources

Topics:
Read next
November 16, 2026

How to Restore Deleted Files and Folders in OneDrive

Restore deleted OneDrive files from the recycle bin, use the whole-drive restore option when appropriate, and verify the recovery without overwriting newer work.
November 16, 2026

How to Investigate Failed Sign-Ins in Microsoft Entra ID

Use Microsoft Entra sign-in logs to isolate failed access, interpret error details, compare device and location signals, and decide what to verify next.
November 16, 2026

How to Search and Export Microsoft 365 Audit Logs in Microsoft Purview

Search Microsoft 365 audit logs in Microsoft Purview, narrow results with useful filters, export evidence, and avoid common retention and permission mistakes.