When moving data between systems, a control total — the sum of a key column and the row count — proves nothing was lost or altered. Compare the source totals to the destination; any difference means a transfer error.
The example
Sum $482,310 over 1,204 rows.
| A | B | |
|---|---|---|
| 1 | Check | Value |
| 2 | Total / Count | 482,310 / 1,204 |
The formula
The formula:
How it works
How it works:
- A control total is the
SUMof a money column plus theCOUNTArow count — a quick fingerprint. - Capture it before the transfer (source) and after (destination).
- If both match, the data moved intact; a mismatch flags lost, added, or altered rows.
- Add a hash-style check — e.g.
SUMPRODUCT(amount, id_number)— to catch reordering or swapped values.
Sum + count catches most transfer errors; a weighted sum catches the rest. Matching totals and row counts confirm volume, but two rows with swapped amounts would still tie. A weighted control total — SUMPRODUCT(amount, row_id) — changes if any value lands on the wrong row, catching subtle corruption that a plain sum misses. It’s the spreadsheet version of a checksum.
Try it: interactive demo
Source vs destination totals.
Variations
Sum matches?
Amount tie:
Count matches?
Row tie:
Weighted checksum
Catch reordering:
Pitfalls & errors
Sum can tie by coincidence. Add a count and a weighted check to be sure.
ROUND the sum compare. Floating-point dust can fail a plain equality.
Same scope. Compare like ranges — exclude headers and totals consistently.
Practice workbook
Frequently asked questions
How do I create a control total for a data import in Excel?
Can a sum match by coincidence?
How do I compare the two sums?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class