U
Useful by Friday
The Monday Test

How to delete repeats in Excel without losing the wrong rows

How to delete repeats in Excel without losing the wrong rows
Learn how to delete repeats in Excel, choose the right matching columns, preview duplicate records, and check your results without losing important data.

The fastest answer to how to delete repeats in excel is to select your whole dataset, open Data > Remove Duplicates, and choose the columns that define a repeat. Excel keeps the first matching row and deletes the others. Before you click OK, make a copy of the sheet: two rows that share an email address, for example, may contain different orders you need to keep.

Prepare the data before removing repeats

Start by deciding what a duplicate means for this job. If you want one row per customer, a customer ID might be the right match. If you want one row per order, use the order ID instead. Selecting customer ID in an order history could erase legitimate purchases from the same customer.

For a simple example, imagine three rows with these values:

Customer 101, Order A12, $40

Customer 101, Order A13, $25

Customer 102, Order A14, $30

Removing duplicates based only on customer ID leaves one row for customer 101 and deletes the other, even though the order IDs differ. Selecting both customer ID and order ID treats those first two rows as distinct combinations.

Save a copy of the workbook or duplicate the worksheet before making changes. Check that the first row contains clear headings and that there are no completely blank rows or columns splitting the dataset. Note the original row count, or use a separate count of the ID column, so you can compare it with the result.

Finally, decide which record should survive. If you want to keep the most recent entry for each customer, sort the entire dataset by date, newest first, before removing duplicates. Excel retains the first occurrence in the selected range, so that ordering matters. Check that the date values are actual dates rather than text, or the sort may not put them in the order you expect.

Illustration for how to delete repeats in excel

How to delete repeats in excel with Remove Duplicates

Click any cell inside the dataset, then select the entire range, including every column that belongs to the records. This is important: selecting just the email column and deleting repeats there can leave the remaining columns out of step with it.

On the Data tab, choose Remove Duplicates. If Excel asks about the selection, expand it to include the full dataset. In the dialog, check “My data has headers” if your first row contains column names. Then select only the columns you want Excel to use for matching.

For exact repeat rows, select all the relevant columns. For one record per customer, select the customer ID column alone. If a repeat is defined by a combination, such as customer ID and order date, select both. A row is removed only when its selected values match an earlier row on every selected column.

Click OK. Excel reports how many duplicate values were removed and how many unique values remain. Compare that message with your original count and spot-check a few records. If the result is wrong, undo the operation promptly or restore the copy, adjust the matching columns or sort order, and try again.

One limitation matters in real work: Remove Duplicates does not merge information from different rows. If one customer row has a phone number and another has a shipping address, removing one can discard a useful field. Resolve those differences before deduplicating, rather than assuming Excel will combine them.

Preview matches before deleting anything

If you are unsure what will be removed, highlight repeats first. Select the cells in the column you want to inspect, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. Pick a format and confirm. Excel highlights repeated values so you can review them without deleting rows.

That highlight is a warning, not a full duplicate-row test. Two matching names may belong to different people, and a repeated customer ID may be correct in a transaction log. Filter or sort the table to bring related rows together, then compare the fields that matter. For a multi-column match, review the relevant columns together rather than treating a highlight in one column as a deletion instruction.

Visual context for how to delete repeats in excel

If you need a separate list instead of changing the original, the UNIQUE function is another option in Excel versions that support it. For example, enter =UNIQUE(A2:A100) in an empty area to produce a distinct list from those cells. The results need room to spill into neighboring cells, and this formula returns unique values from the selected range; it does not remove the original records. For unique combinations across columns, use a range such as =UNIQUE(A2:C100).

The distinction matters: a list of unique customer IDs is useful for a mailing count, but it does not automatically produce a reliable, complete customer record. If the other fields differ, you still need a rule for choosing or combining them.

Fix matches Excel might miss

Two entries can look identical and still differ underneath. Leading or trailing spaces, extra spaces between words, and nonprinting characters copied from another system can prevent a match. In a helper column, =TRIM(A2) removes ordinary extra spaces; =CLEAN(A2) removes certain nonprinting characters. Review the cleaned results before using them as your matching field, since cleaning can also change data you intended to preserve.

Numbers stored as text can also complicate comparisons and sorting. Check the source values and convert them consistently when appropriate. Be careful with identifiers such as ZIP codes or account numbers: converting them to numbers can remove leading zeros. Those fields are often better treated as text.

For names and addresses, exact matching has another limit. “Main St” and “Main Street” may refer to the same address, but standard duplicate removal will not reliably recognize that. Sort and review likely matches manually, or establish a consistent naming convention before attempting a broader cleanup.

Check the result and document the rule

After removal, compare the remaining count with your starting count and Excel’s removal message. Search for a few IDs you expected to be consolidated and a few similar records you expected to remain separate. Open the saved copy if you need to compare a deleted row with the one Excel kept.

For a recurring report, write down the matching columns, the sort order, and any cleaning steps. That small handoff note prevents the next person from deduplicating orders when the task was to deduplicate customers.

You can ask GPT-6 to help draft a cleanup checklist using fictional column names and sample rows, but do not paste sensitive customer data into a tool without your organization’s approval. Its suggested matching rule still needs a human check against the actual business question. Don’t guess whether it works. Run the result.

Last revised · 2026-11-18 22:03
Letters
Readers Write

No letters yet — be the first to write.

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