U
Useful by Friday
The Monday Test

How to remove the duplicate values in Excel without losing the wrong data

How to remove the duplicate values in Excel without losing the wrong data
Learn how to remove the duplicate values in Excel, choose the right columns, preserve your original data, and check the results before sharing your file.

The quickest answer to how to remove the duplicate values in excel is to select your data, open Data > Remove Duplicates, and choose the columns Excel should compare. Excel keeps the first matching row and removes later matches. Work on a copy first: the right comparison columns make the difference between a clean list and missing customer records.

Start with a copy and choose what counts as a duplicate

Save a separate copy of the workbook, or duplicate the worksheet before making changes. Remove Duplicates changes the selected data rather than creating a separate results list. Undo may help immediately afterward, but a saved copy is a safer fallback if you close the file or make other changes.

Next, decide what makes two records the same. In a contact list, an email address might be enough. In an order list, the same customer can legitimately appear many times, so an order number may be the better key. If you select both first name and last name, Excel treats rows as duplicates when both selected values match; a match on just one of them is not enough.

For example, imagine three rows with the same customer name. Two contain order number 104 and one contains order number 105. Comparing the name alone leaves one row. Comparing the order number leaves two. Neither choice is universally right; it depends on whether you are cleaning a customer list or an order list.

Include the full table when selecting your data, even if you plan to compare only one column. That way, Excel removes entire matching records within your selection rather than leaving names, amounts, and other fields out of alignment. Check that the table has a single header row and no unrelated data immediately beside it.

Illustration for how to remove the duplicate values in excel

How to remove the duplicate values in excel with Remove Duplicates

  1. Select a cell inside your table, or select the entire range you want to clean, including its headers. If Excel asks whether to expand the selection, expand it to include the other columns in the records.
  1. On the Data tab, select Remove Duplicates. Depending on your version and window size, you may find it in the Data Tools group.
  1. Check My data has headers if the first row contains column names. Confirm that Excel shows the columns you expect.
  1. Select the column or columns that define a match. To remove repeated email addresses, for example, select Email and clear the other checkboxes. To remove only rows with the same email and order number, select both.
  1. Select OK. Excel reports how many duplicate values were removed and how many unique values remain. Check the resulting rows against your copy before saving or sharing the cleaned file.

Excel keeps the first occurrence in the selected range, so the row order matters. If you need the most recent record for each email address, sort the entire table by the relevant date, newest first, before removing duplicates. Check that the dates are real Excel dates rather than text, and make sure the sort includes all columns so each record stays together.

A warning about partial selections: selecting just the email cells and removing duplicates there can leave the other columns untouched. The remaining addresses may no longer correspond to the names beside them. If that happens, undo immediately and repeat with the full table selected.

Preview matches before deleting anything

If you are not sure which rows should go, highlight potential duplicates first. Select the cells in the column you want to inspect, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. Choose a format and select OK.

This highlights repeated values; it does not delete them or decide which record is correct. It is useful for spotting repeated email addresses, but it does not by itself check whether a combination of email and order number is duplicated. Review the surrounding columns before taking action.

You can also use a formula when you want a visible count. If email addresses start in A2, enter =COUNTIF($A$2:$A$100,A2) in a helper column and fill it down. A result greater than 1 means that value appears more than once in the specified range. Adjust the range to cover your data, and note that blank cells can be counted as matches too.

Visual context for how to remove the duplicate values in excel

For a separate list that updates with its source, use =UNIQUE(A2:A100) in an empty area if your version of Excel supports the UNIQUE function. It returns distinct values without deleting the original rows. Leave room below the formula for the results to spill, and remember that a single-column result does not carry along the rest of each customer record.

Fix look-alikes and check the handoff

Not every apparent duplicate is an exact match. Extra spaces, inconsistent punctuation, and text that looks like a number can cause records to be treated differently. For ordinary extra spaces, a helper formula such as =TRIM(A2) can clean a text value before you compare it. Inspect the result: TRIM does not remove every kind of invisible character.

Be careful with blanks in a key column. If you compare only email addresses, multiple blank emails may be treated as duplicates even though they belong to different people. Filter for blanks and decide how to handle those rows before running the removal.

Afterward, check three things: the number of rows removed, a few records you expected to survive, and any high-stakes records where the retained row matters. Compare the count with your expectations, but do not treat a plausible number as proof that the right records were kept.

If you want GPT-6 to help plan the cleanup, share a small fictional example rather than confidential customer data. Ask it to explain which columns it would compare and what might be lost. Then apply the steps in Excel and inspect the output yourself. Don’t guess whether it works. Run the result.

Last revised · 2026-11-17 23:59
Letters
Readers Write

No letters yet — be the first to write.

Write a letter
© 2026 Useful by Friday. Useful by Friday