How to compare two Excel sheets or files for differences
You have last month's file and this month's file and need to know what changed. Excel can show two windows side by side, flag cells with a formula, or use its Spreadsheet Compare tool. Here is what each does, where it stops, and one option that lists every change.
Hullspark ยท updated 2026-10-29
Short answer
- A few cells, same layout: View > View Side by Side, or a formula such as
=Sheet1!A1<>Sheet2!A1filled over the range on a third sheet. Both compare position with position. - Windows, Microsoft 365 Apps for enterprise: Spreadsheet Compare compares worksheet contents side by side, colors the differences by type and can export the results to an Excel file [1]. Microsoft says it is available only in those plans and equivalent editions [1].
- Rows were inserted or moved: a formula that compares A1 with A1 marks every row below the insertion as different. This is where a content-based comparison helps.
What Excel gives you out of the box
| Way | Good for | Catch |
|---|---|---|
| View Side by Side (View tab) | Two windows next to each other, scrolling together | You read the differences yourself. Nothing is flagged |
| Formula on a third sheet | Flagging cells that differ in the same position | Compares by position. One inserted row makes every row below it differ. For two files the formula must point at the other workbook |
| Conditional formatting with a formula | Coloring the different cells where they sit | Same catch as the formula. Colors do not give you a list you can hand on |
| Spreadsheet Compare [1] | Cell-by-cell comparison with colors by change type and Export Results | Available only in Excel for Windows in Microsoft 365 Apps for enterprise plans and equivalent editions [1] |
Doing it with a formula
- Save copies of both files. Keep the originals as they are.
- Make sure both sheets start at the same row and have the same columns in the same order. Delete a title line above the table if only one file has it.
- On a new sheet in the first workbook, type
=Sheet1!A1<>Sheet2!A1in A1. For a second file, point the formula at the other workbook instead. - Fill the formula right and down over the area of both tables. TRUE marks a cell that differs.
- To count the differences in one number, use
=SUMPRODUCT(--(Sheet1!A1:Z1000<>Sheet2!A1:Z1000))and change the range to fit your table. - If a row was inserted, sort both tables by the same key first. Otherwise everything below the insertion shows as different.
Where the built-in way stops
- Position, not meaning. A formula does not know that a row moved. It sees a different value in the same place.
- No list. You get TRUE and FALSE in a grid, not a list with the sheet, the cell, the old value and the new value.
- Edition. Spreadsheet Compare is not in every edition of Excel [1].
- Setup per pair. Every new pair of files means building the grid again.
One option: our own app
I make a Windows app for this, Sheet Compare by Hullspark. What it does, as the current code and the product page describe it:
- One list of differences. Changed cells, added rows, removed rows and added or removed columns, each with the sheet, the cell, the value before and after, and the kind. Six counts sit at the top.
- Rows that moved or were inserted. Row order lines rows up by content, so one inserted row does not turn the rows below it into differences. Key columns lets you pick up to three columns, such as an employee or order number, and compares rows that share the key.
- A title line above the table. The heading row is picked automatically. You can set it per sheet and per side, rows 1 to 30 or none.
- Hand the result on. Export to .xlsx: a summary, a differences list and a side-by-side sheet for each compared sheet.
- Your files stay put. The originals are only read, and nothing goes over the network.
It reads .xlsx only. It compares cell values, and formulas by their saved results. Comments, pictures, shapes, charts, pivot tables, conditional formatting and data validation are not compared. .xls, .xlsm, .xlsb and password-protected files are not read. The on-screen list shows the first 10,000 differences and the exported file holds all of them. Windows only.
Get Sheet Compare on the Microsoft Store Product page
Questions
Does Excel have a tool to compare two files?
Some Office editions include a separate program, Spreadsheet Compare. It is available only in Excel for Windows in Microsoft 365 Apps for enterprise plans and equivalent editions [1].
Why does everything below one inserted row show as different?
A formula compares the same position in both sheets. When a row is inserted, every row below it moves down by one, so each cell meets a different value. A comparison that lines rows up by content avoids this.
Do I need Excel to use Sheet Compare?
No. It reads .xlsx files itself.
How big a file can it handle?
Measured on the author's PC with made-up data: 100,000 rows by 20 columns, nearly every value different, took about 15 seconds and about 700 MB of memory. 1,000,000 rows was not measured. Other PCs were not measured.
Does it change my files?
No. The originals are only read.
What I have not verified
I checked the Excel claims on this page against Microsoft's Spreadsheet Compare article on 2026-10-29. I did not re-test each menu path on every version of Excel.
The formulas are ordinary cell comparisons and I did not time them on large sheets. The app description comes from its current code and product page. The exported .xlsx has not been opened in a spreadsheet app itself. I have not tested other vendors' tools and name none.
Sources
- [1] Microsoft Support: Compare two versions of a workbook by using Spreadsheet Compare (fetched 2026-10-29): https://support.microsoft.com/en-us/office/compare-two-versions-of-a-workbook-by-using-spreadsheet-compare-0e1627fd-ce14-4c33-9ab1-8ea82c6a5a7e
- [2] Microsoft Store listing of the app: https://apps.microsoft.com/detail/9PMQXQ5C4T1L
Related
Checked 2026-10-29. Menu names follow Microsoft's support articles for Microsoft 365 and were not checked on every version. Microsoft, Windows and Excel are trademarks of Microsoft Corporation. This page and the app are not affiliated with, made by or endorsed by Microsoft.
Questions? Support or support@hullspark.com. Privacy policy