Skip to content
← All Blogs
Duplicates

How to handle duplicate rows without writing a single formula

Quick answer

Decide what counts as a duplicate first, then remove them on a copy of the sheet. Use Data, Remove Duplicates with every column ticked for exact copies. To keep the latest version of a record, sort newest first and tick only the ID column. Finally, reconcile the row count with the source system.

Many CRMs and order systems export a new row every time someone touches a record, so your "orders" file has order 10231 three times — once when it was created, once when the address was fixed, once when the status changed to shipped. To a human reading it, it's obviously one order. To your SUM, it's three, and the revenue you report is inflated by every record anyone ever edited. You could reach for a nest of formulas to sort this out. You don't need to — Excel has built-in tools that do it faster and leave less to go wrong.

See the duplicates before you delete anything

Never remove duplicates you haven't looked at. First make them visible: select the key column, then Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values. Every repeated Order ID turns red, and you can scroll and see the shape of the problem — is it a handful of records, or is half the file duplicated? This is the step people skip, and it's the one that stops you deleting rows that only looked like duplicates.

The example: one order, three rows, one truth

Here's order 10231 as the CRM exported it:

Order ID | Status   | Amount | Updated
10231    | created  | 420    | 2026-06-01
10231    | created  | 420    | 2026-06-02
10231    | shipped  | 420    | 2026-06-05

Three rows, one £420 order, and your total currently says £1,260. Notice the trap: the first two rows are truly identical, but the third differs in the Status and Updated columns — that row is the latest version of the same order, so keep it and drop the older one. This is why "remove exact duplicates" isn't enough on its own. The formula you'd normally reach for here is =COUNTIF(A:A, A2) to count repeats — but you don't need to write it, because the built-in tools handle both cases directly.

Remove them the no-formula way

  1. Work on a copy. Duplicate the sheet first — Remove Duplicates deletes rows permanently, with no undo once you've saved and closed.
  2. Kill exact duplicates. Select the table, then Data → Remove Duplicates, and tick every column. This removes only rows that match on all columns — the two identical "created" rows collapse to one, and the "shipped" row stays because it genuinely differs.
  3. Keep only the latest per key. When you want one row per Order ID and the versions differ, don't use Remove Duplicates — sort by Updated newest-first, then Remove Duplicates ticking only the Order ID column, which keeps the first (newest) occurrence and drops the rest.
  4. Or use Power Query for a repeatable version. Data → From Table, then Group By Order ID with "Max" on Updated, and the whole de-duplication re-runs on next month's file with one refresh.
  5. Reconcile the count. After removing, check that your row count matches the order count in the system the file came from. If it doesn't, you removed a real record or missed a duplicate.

Decide what a duplicate means before you touch the button

The usual mistake is deleting first and deciding what a duplicate is afterwards. "Duplicate" means something specific to each dataset — an identical row, or an older version of the same key — and only the business rule behind the data tells you which. Ask whoever owns the system if you're not sure. Get that definition first, make the duplicates visible second, remove them third, and reconcile fourth. Do it in that order and you never have to explain why the revenue dropped by a number you can't account for.

Write the before-and-after counts down. A note like "Collapsed 1,400 exported rows into 900 orders, one per Order ID, keeping the latest update; count matches the order system" takes a minute and answers the question someone will ask the first time revenue looks lower than last month's report. Without it, a correct drop in the total looks like a mistake.

Dotwave removes exact copies, flags an ID that appears on more than one row and lets you keep the most complete, first or last row, and finds near-duplicates for you to review before anything merges. Every step shows its effect first and can be undone.

Create your free account
More articles

Keep reading

All articles →

Clean your next file in Dotwave

Fixes you approve, a plain-English record of every change, and a dashboard you send by link, PDF or scheduled email.

Create your free account

Free plan, no card required