How to find duplicates in a spreadsheet

12 September 2026 · EMRSAYGINER

Excel has a button called Remove Duplicates. It works, it is fast, and it deletes rows without ever showing you which ones. You get a message saying 1,284 duplicate values were removed, and no way to see what they were.

That is fine when you already know the file. It is a bad idea on a file someone else produced, because the interesting question is almost never "how do I delete these" — it is "why does this file contain the same invoice twice, and is it really the same invoice."

First decide what a duplicate is

This is the whole problem, and it is not a technical one. Two rows are duplicates when they mean the same thing, and only you know which columns carry the meaning.

The distinction that matters most: if two rows match on your key columns but differ somewhere else, they are not duplicates. They are a conflict. Deleting one throws away whichever version was right, silently, and there is no way to tell afterwards which one you kept.

Doing it in Excel

Highlight duplicates in one column

Select the column, then Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values. Quick, visual, and limited to a single column — it tells you a value appears twice, not that a row does.

Count occurrences, so you can filter

A helper column beats highlighting because you can sort and filter on the result:

=COUNTIF($A$2:$A$50000, A2)

Anything above 1 appears more than once. To mark only the second and later occurrences — the ones you would actually delete — anchor only the top of the range:

=COUNTIF($A$2:A2, A2) > 1

Match on several columns at once

Build a key first, then count the key:

=TRIM(LOWER(A2)) & "|" & TEXT(B2,"yyyy-mm-dd") & "|" & ROUND(C2,2)

The TRIM and LOWER are not decoration. They are what makes the comparison work on real data, for the reason in the next section. The separator matters too: without it, "AB" + "C" and "A" + "BC" produce the same key and you invent duplicates that do not exist.

Why two identical-looking rows do not match

Exact matching is exact. These pairs all look the same on screen and are not equal:

What you seeWhat is actually there
ACME Ltd / ACME Ltd A trailing space, usually from a copy-paste or a fixed-width export
ACME Ltd / Acme LtdDifferent case — Excel's COUNTIF ignores case, but most other tools do not
ACME Ltd / ACME LtdA non-breaking space (U+00A0), pasted from a web page. TRIM does not remove it
1000 / 1000One stored as a number, one as text — a very common result of importing a CSV
01/02/2026 / 2026-02-01The same date in two formats, or worse, two different dates read under two conventions

Normalise before you compare: trim, fold case, round the decimals you do not care about, and format dates into one shape. Most "the tool did not find the duplicates" complaints are one of these five rows.

That last pair is not really a duplicate problem — it is Excel rewriting values as it reads the file. Why Excel ruins CSV files covers what it changes and how to stop it.

Where duplicates come from

Knowing the cause tells you which copy to keep.

CauseWhat the rows look likeWhich to keep
Merging overlapping exportsByte-identicalEither — it genuinely does not matter
An export run twiceIdentical apart from an export timestamp columnEither; drop the timestamp column from the key
Double data entrySame key, small differences elsewhereThe later one — but look at both first
A join that fanned outOne row repeated once per matching child recordNone. The query is wrong, not the data

That last one deserves a moment: if every order appears three times and every order has three line items, you do not have duplicates, you have a join that multiplied rows. Deleting the extras destroys the line items. Fix it upstream. If the file came from a merge you did yourself, how to combine multiple CSV files covers the overlap problem at the point where it is created.

Doing it in the browser

Remove duplicate rows takes a CSV or Excel file, lets you pick which columns define a duplicate rather than assuming the whole row, and shows you the count before anything is removed. It runs on your own machine — the file is read by the page, not sent to a server — which is the practical requirement when the spreadsheet contains other people's names, emails or invoices.

You can verify that claim yourself in about ten seconds: open developer tools, go to the Network tab, drop the file in, and watch that nothing goes out. There is more on why in how to analyze a CSV without uploading it.

Free tools for each step

Each is a single page with no account and no server behind it.

The short version

Decide which columns define a duplicate before you touch anything — that decision is the actual work. Find and look at the matches before deleting, because a file that contains the same invoice twice is telling you something about the process that produced it. Normalise whitespace, case and number formatting first, or exact matching will miss the duplicates that matter. And if the matching rows differ in any column you did not include in the key, stop: that is a conflict to reconcile, not a duplicate to delete.

Related reading

How to combine multiple CSV files into one: the merge step that creates most duplicates, and how to reconcile the row counts.
Why Excel ruins CSV files: the type conversions behind the numbers-stored-as-text mismatch.
How to open a CSV that is too big for Excel: when the file is too large to scan by eye at all.

See the duplicates as part of the whole picture

Sheet Insights reads an Excel or CSV file in your browser and reports on its quality along with everything else — duplicate and missing values, column statistics, outliers, totals by category, trends over time, and a repeatable clean-up recipe for the columns that always come in dirty. No row limit, no account, no upload. The free version opens two files of your own and shows all of it; saving the cleaned file, the report or the JSON back out is what the Windows app does.

Open it and drop a file in