This tool lets you compare two Excel files cell by cell in your browser, value and formula, and shows which cells one version changed, added or removed. The usual case is a file that went out and came back. You sent the regional forecast to six managers on Monday, one returns it on Thursday with "a few tweaks", and you need to know which cells those were before the numbers go into the board pack.
How to compare two Excel files
- Drop the older version on the "Older file" box and the newer version on the "Newer file" box, or click each box to browse. Both can be .xlsx, .xlsm, .xls, .xlsb or .ods, up to 20MB each.
- The compare starts as soon as both files are in. It opens on the first sheet the two files share by name, ignoring upper and lower case, so "Forecast" pairs with "FORECAST".
- Read the two sheets side by side. Changed cells are boxed in amber, added cells in green on the newer side and removed cells in red on the older side. Scrolling one sheet scrolls the other. Click any cell to see what it holds in each file, formula included.
- Click "Next change" and "Previous" to step through the differences, or tick "Hide unchanged rows" to see only the rows that differ.
- To compare a different sheet, pick it in the "Older sheet" list. Its namesake in the newer file comes with it, and you can pick any other "Newer sheet" to pair two sheets with different names. Hidden sheets are in the lists too, marked "(hidden)".
- Under the sheets, the change list gives each changed cell's address, the kind of change, what it was and what it is now. "Copy all" copies it as a table you can paste into Excel.
Neither file is uploaded, and switching sheets doesn't read the files again. On a phone, one sheet shows at a time with an Older file / Newer file switch.
What counts as a change
The compare looks at two things in each cell: the value and the formula. Everything else is ignored. The summary counts cells changed, added and removed, and rows inserted and deleted.
| Older file | Newer file | Result |
|---|
| 1,200 | 1,250 | Changed |
| Empty | 42 | Added |
| Q3 budget | Empty | Removed |
=B12*C12 in D12 | =B13*C13 in D13, after a row was inserted above it | No change |
=B5*C5 | =B5*C5*1.2 | Changed |
=SUM(B2:B10) showing 900 | Same formula, now 950 because B4 changed | Changed, with both results |
| 1 (a number) | 1 (text) | Changed |
| 1200 in General format | 1200 formatted as $1,200.00 | No change |
The number-against-text row catches people out. Re-export a customer list from a CRM and an ID column that used to hold numbers can come back as text that looks identical. The compare reports every one of those cells, and it should: a VLOOKUP that looks the IDs up as numbers returns #N/A against the text ones.
The last row is the other side of that. Formatting isn't compared at all, so a reformatted report with the same numbers comes back clean.
Why one inserted row doesn't flag the rest of the sheet
Most ways of comparing two sheets in Excel match row 50 with row 50. Insert one row at the top of the newer file and row 51 now sits opposite row 50, so every row below the insertion reads as changed. Ablebits' guide says as much about its own formula method: it can't detect added or deleted rows. A 4,000-row price list with one new product at row 12 turns into 3,989 rows of noise.
This tool lines up the rows before it compares cells. The new row shows once, in green, opposite an empty shaded row on the older side, and the 3,989 rows below it stay unchanged. A deleted row works the same way in reverse.
Two cases still produce noise:
- An inserted or deleted column. Columns are compared by position, so a column added at C makes every cell to its right show as changed. Insert an empty column at the same place in a copy of the older file and compare again; the columns line up and the real changes show.
- A row that moved and was edited. Where rows were inserted and deleted together, they're paired by position, from the top or the bottom, whichever changes fewer cells. A row that was cut, pasted lower down and edited can show as one row deleted and another inserted.
Formulas that were copied, moved or recalculated
Comparing formula text gives false alarms once rows have moved. Insert a row above row 12 and Excel rewrites the formula that was =B12*C12 in D12 as =B13*C13 in D13. It still does exactly the same thing, but the text differs, so a text compare flags it, along with every formula below the insertion. In R1C1 form, Excel's other way of writing references, both read =RC[-2]*RC[-1]: "the cell two to the left times the cell one to the left". The tool compares every formula in that form, so a formula that moved with its row isn't flagged, and neither are the copies of a formula filled down a column.
When a formula is flagged with no change to its own text, look at what it reads. Change one input in B4 and every total that depends on it shows as changed, with its old and new results, because the number really is different. Click the cell to see its formula in the usual A1 form. Cells of an array formula or a dynamic-array spill count as formula cells, so a spill that now comes out in a different order shows as changed results, not as typed edits.
Comparing two files in Excel without this tool
Excel's own tool is Spreadsheet Compare. Microsoft lists it only for Office Professional Plus 2013, 2016 and 2019 and Microsoft 365 Apps for enterprise, and only in Excel for Windows. Microsoft 365 Personal and Family aren't on that list, and neither is any Mac. If you have it, type Spreadsheet Compare in the Start menu, click Home > Compare Files, put the older file in "Compare" and the newer one in "To". It also reports formatting and macro changes, and Home > Export Results saves a report. It's the better choice when formatting matters.
Without it, the manual route is a formula on a third sheet:
- Copy one sheet into the other workbook: right-click its tab, choose Move or Copy, pick the other workbook and tick "Create a copy". Name the two sheets Old and New.
- Add a sheet, type this in A1 and fill it across and down as far as the data goes:
=IF(Old!A1<>New!A1,"Old: "&Old!A1&" | New: "&New!A1,"")
- To colour the differences on the New sheet instead, select its data from A1 and add a rule under Home > Conditional Formatting > New Rule > Use a formula, with
=A1<>Old!A1.
Both compare by position, so they break on an inserted row as described above, and they compare results only: a changed formula with the same result passes. View > View Side by Side is fine for a glance at a short sheet.
If the older version only exists in OneDrive or SharePoint, File > Info > Version History opens earlier saves of the file. Open the one you want and save a copy, and you have both versions to compare.
Limits
- One sheet pair at a time. The compare covers the two sheets picked, not the whole workbook at once.
- Values and formulas only. Formatting, comments, charts, defined names, data validation and conditional formatting aren't compared. Chart sheets and macro sheets are left out of the lists, as they have no cells.
- 100,000 changes a sheet. Past that, the summary still counts them, but only the first 100,000 are listed and boxed.
- Very large sheets. The compare has a time limit per sheet. Rows it couldn't line up in time are compared at the same row number, and the page says when that happened.
- No report download. The result is on the page. "Copy all" gives you the change list as a table with the columns Newer cell, Older cell, Change, Was, Now, Was (formula) and Now (formula).
- Nothing is merged. The tool shows differences and never changes either file.
- File size. 20MB a file, or 50MB a file with Pro.
- Password to open. A file encrypted with a password to open is detected, and the page explains it can't be read. Open it in Excel and save a copy without the password, then compare that.
If your two files are lists in a different order, say this month's customer IDs against last month's, a side-by-side compare is the wrong question. Paste both lists into Compare Two Columns, or copy one column into the other file, and it finds which values are in both, only in the first and only in the second. To look through one workbook without Excel, hidden and very hidden sheets included, use the Excel Viewer.
Questions
How do I compare two Excel files for differences?
Put the older and newer versions side by side and mark every cell whose value or formula differs. Excel's own tool for this, Spreadsheet Compare, only comes with some Windows editions. Without it, either copy both sheets into one workbook and fill an IF formula across a third sheet, or use a compare tool that lines up inserted rows, since the formula method flags every row below an insertion.
Does Excel have a built-in compare feature?
Yes, Spreadsheet Compare, but Microsoft lists it only for Office Professional Plus 2013, 2016 and 2019 and Microsoft 365 Apps for enterprise, in Excel for Windows. Open it from the Start menu by typing Spreadsheet Compare, or from Inquire > Compare Files if the Inquire add-in is on. It doesn't run on a Mac.
Why does every row show as different after one row was inserted?
Because the comparison matched rows by number, so after the new row each row is checked against the one above it in the other file. A cell-by-cell IF formula or a conditional formatting rule like =A1<>Sheet2!A1 always does this. A compare that lines up rows first reports one inserted row and leaves the rest alone.
Does it compare formulas or just values?
Both. A cell counts as changed when its value changed or when its formula does something different, and formulas are compared in R1C1 form, so a formula that moved down with its row after an insertion isn't flagged just because its references now name the next row. A formula whose result changed because a cell it reads changed also shows, with its old and new results.
Does the compare pick up formatting changes?
No. Only values and formulas are compared, so a new fill colour, font or number format on a cell whose value is the same is not a difference. If formatting is what you need to check, Spreadsheet Compare's Cell Format option covers it on the Windows editions that include it.
How do I compare two Excel sheets side by side in Excel?
Open both workbooks and click View > View Side by Side; Synchronous Scrolling turns on with it, so both windows scroll together. For two sheets in the same workbook, click View > New Window first, then View Side by Side. It only lines up as long as neither sheet has had rows inserted or deleted.
Are my files uploaded when I compare them here?
No. Both files are read in your browser, in a Web Worker, and nothing is uploaded or saved to a server.