Spreadsheets · 10 min read
How to Compare Two Excel Files and Find the Differences
By the site owner · Published
Two versions of the same spreadsheet land on your desk: last month's price list and this month's, the customer export before and after a migration, the budget your colleague sent back “with a few changes”. The question is always the same — what exactly is different? — and Excel has no single button that answers it well for every kind of file.
This guide walks through Excel's own options and where each one breaks down, then explains the part that decides whether a comparison is right at all: how rows of the old file are paired with rows of the new one. It covers inserted, deleted and moved rows, number and date formats that look different but mean the same thing, and tolerances for rounding. The last sections show how Toolula's Compare tool does it, including the Excel report it writes.
Option 1: View Side by Side
Open both workbooks and choose View → View Side by Side. Excel arranges the two windows next to each other, and with Synchronous Scrolling switched on both scroll together. To compare two sheets of the same workbook, first open a second window of it with View → New Window.
This works for a quick look at a short, stable table. It relies entirely on your eyes, and it assumes that row 57 on the left and row 57 on the right describe the same thing. As soon as one file has a row inserted near the top, every row below is offset by one and the synchronised view shows two different records side by side.
Option 2: a formula sheet
For a cell-by-cell check, add a third sheet and put a formula in A1 such as =IF(Old!A1<>New!A1, Old!A1&" → "&New!A1, ""), then fill it across and down over the whole range. Every cell that differs shows the old and new value; everything else stays empty. Conditional formatting does the same visually: select the data on the New sheet, choose Home → Conditional Formatting → New Rule → Use a formula, enter =A1<>Old!A1 and pick a fill colour.
Both methods compare positions, not records. They share the inserted-row problem of side by side, they flag 1234.5 and “1,234.50” stored as text as different, and they say nothing about rows that exist in only one file. They are good for checking a fixed form or a template whose layout never changes.
Option 3: lookups by an ID
When each row has an identifier — an article number, customer ID or invoice number — you can compare records instead of positions. In the new sheet, =XLOOKUP(A2, Old!A:A, Old!C:C, "missing") fetches the old price of the same article, and a second column such as =C2<>D2 marks the changed ones. =COUNTIF(Old!A:A, A2)=0 finds rows that are new; the same formula in the other direction finds deleted rows. In older versions VLOOKUP or INDEX/MATCH do the job.
This is the right idea, and it scales to a few columns. It gets laborious with twenty columns, because each needs its own lookup and comparison; it quietly returns only the first match when an ID appears twice; and a trailing space in “A-100 ” is enough for the lookup to miss. Power Query can do the same more robustly: load both tables, choose Merge Queries with a Full Outer join on the ID column and expand the old columns next to the new ones.
Option 4: Spreadsheet Compare
Microsoft ships a dedicated tool, Spreadsheet Compare, with some Office editions for Windows — Office Professional Plus and Microsoft 365 Apps for enterprise — together with the Inquire add-in. It compares two workbooks and lists differences in entered values, formulas, defined names, macros and formatting, which makes it strong for auditing a financial model where the formulas matter as much as the numbers.
The catch is availability: it is not part of Home or Business editions and doesn't exist on the Mac or in Excel for the web. It is also built around comparing workbooks as workbooks, not around matching the rows of a data export by an ID column, so for lists that were re-sorted or filtered it is less helpful than its name suggests.
The real question: which row belongs to which?
Every comparison stands or falls with the pairing of rows. If the files have a key — a column whose value identifies a row in both versions — pairing is unambiguous: the row with article number 4711 in the old file belongs to the row with 4711 in the new one, wherever they stand. Rows whose key appears only in the new file are added, rows whose key appears only in the old file are removed, and everything else is compared cell by cell.
A good key is unique on both sides and found on both sides. Columns named ID, number, SKU, EAN or e-mail are usually candidates; prices, quantities, dates and long descriptions can be unique by accident without identifying anything. Sometimes no single column works but a combination does, for example order number plus line number. And sometimes keys repeat — the same customer twice in an export. Then the comparison has to decide which copy pairs with which; pairing them in file order and reporting the duplicates is far safer than silently multiplying rows, which is what a plain join does.
Without any key — a list of names and amounts, a log, a table someone typed by hand — rows can only be matched by their content and order, the way a text-diff tool compares two versions of a document. That finds inserted and deleted rows well. It also has to recognise a row that only moved: the same content at another position is a move, not a deletion plus an addition.
Noise that isn't a difference
Many reported “differences” are formatting. A number stored as text with a thousands separator, “1.234,50” from a German export against 1234.5 in the new file, is the same amount. A date written “31.12.2024” and a real date cell showing 2024-12-31 are the same day. “ACME GmbH” and “ACME GmbH ” differ only by a trailing space, an empty cell and a cell with nothing in it mean the same, and 0.1 + 0.2 computed in a spreadsheet is not exactly 0.3.
Decide before you compare which of these you want to ignore. Case and extra spaces are usually noise; for a product code, upper and lower case might matter. For amounts that were recalculated, a tolerance — say ±0.01 absolute, or ±0.5 percent of the value — separates rounding from real changes. Without such rules a comparison of two exports from different systems can report thousands of changes that nobody needs to look at.
Comparing with Toolula's Compare tool
Compare two Excel files (and its twin for CSV files) is a mode of Toolula's Data Workbench. You drop the old and the new version — two CSV, Excel, JSON or Parquet files, or two sheets of one workbook — and the comparison runs in your browser in DuckDB, a database engine compiled to WebAssembly. The files are not uploaded, and tables with millions of rows work on a normal computer; on phones with little memory the tool warns that two files over about 100 MB each may not fit.
- Drop both files, or open one and pick the second table. “Swap old and new” turns the direction around.
- Columns are matched by name first, then by a normalised name (“Unit Price” = “unit_price”), then renamed columns by name similarity, position and shared values. Untick columns that are allowed to differ, such as timestamps or comments.
- The tool looks for a key itself. It ranks candidate columns on the first 200,000 rows, measures the best ones exactly over every row — unique on both sides, present on both sides — and prefers identifier-like names while penalising decimals, dates, long text and plain whole numbers such as quantities. You can change the key, combine several columns, or choose no key.
- Set the rules: ignore upper/lower case, ignore extra spaces, empty cell = missing value, ignore number formatting (1.234,50 = 1,234.50), ignore date formatting (31.12.2024 = 2024-12-31), and an absolute or percentage tolerance for numbers.
- Read the counts — changed, added, removed, unchanged and, without a key, moved — and browse the grid of differences, filtered to one column if you like. Changed characters inside a cell are highlighted.
How the tool pairs rows
With a key, rows are paired by the normalised key value plus its occurrence number, so a key that appears twice pairs its first copy with the first copy and its second with the second, in file order. The result shows a warning with the number of repeated keys and examples, instead of multiplying rows. Whole numbers are compared as text unless you set a tolerance, so 18-digit IDs stay exact instead of being rounded to the 15–17 digits a floating-point number holds.
Without a key, each row is reduced to a fingerprint of its normalised values and the two sequences are aligned like lines in a text diff: the common start and end first, then rows that occur exactly once in both files as anchors, and an exact alignment for the small stretches in between. A row found unchanged at another position is reported as moved, with the row it came from. Within a stretch of differing rows, a row is paired with a similar one as “changed” when at least half of its columns are equal; the rest are added or removed. If only the content matters and not the order, “Ignore row order” counts moved rows as unchanged.
The Excel report and the other downloads
“Excel report (.xlsx)” writes a workbook with five sheets. Summary lists the files, the rules and the counts. Changed rows shows each changed row twice, the old line and the new line, with the changed cells highlighted — new values bold on yellow, old values struck through in red. Change list has one line per changed cell with the key, the column, the old and new value and, for numbers, the difference and the difference in percent; it has a filter row, so you can narrow it to one column in Excel. Added rows and Removed rows complete it.
The report holds up to 100,000 lines per sheet so it stays usable in Excel. For bigger results, the change list on its own (CSV, Excel, Parquet or JSON) and the “New version with change flags” — the new table with two extra columns saying what changed and in which columns, removed rows kept — always contain every row.
Limits worth knowing
The tool compares what the cells contain. It doesn't compare formulas, cell formatting, comments, charts or macros, so for auditing how a model calculates, Spreadsheet Compare or a formula sheet is still the better instrument. It compares one table against one table; to check several sheets, compare them pair by pair. And without a key, a list in which many rows are identical, or in which most rows changed at once, gives a less certain pairing than a real ID — if the data has one, use it.
Frequently asked questions
How do I compare two Excel sheets for differences without formulas?
Drop both files, or two sheets of one workbook, into Compare two Excel files. It pairs the rows, lists changed, added and removed rows and can download a highlighted Excel report.
Why does Excel show every row as changed after one inserted row?
Side by side, formula sheets and conditional formatting compare cell positions. One inserted row shifts everything below it. Compare records by an ID column, or use a tool that aligns rows.
Can I compare two files that have no ID column?
Yes. Without a key, rows are matched by content and order like a text diff; inserted, deleted and moved rows are recognised, and similar rows are paired as changed.
How do I ignore rounding differences?
Set a tolerance under Rules: an absolute value such as 0.01, a percentage, or both. Numbers within it count as equal.
Are my spreadsheets uploaded?
No. The comparison runs in DuckDB inside your browser tab; the files stay on your device.
Does it compare formulas and formatting?
No, it compares cell values. For formulas, defined names and formatting, use Microsoft's Spreadsheet Compare where your Office edition includes it.
How this guide is kept current: it is checked against the official sources it cites and against the Toolula tools it describes, and revised when a rule, deadline or tool changes. The date above shows the last revision.