How to compare two Excel workbooks and find what changed
Four ways to compare two versions of an Excel model, what each one shows, and the order in which a reviewer reads the differences.
- Model review
- Version control
On this page
You get version 7 of a model. You reviewed version 6 last month. What changed? To compare two Excel workbooks, use Spreadsheet Compare if you have it. Open Inquire → Compare Files. Pick the old file as “Compare” and the new file as “To”. It lists the changed values, formulas and formats.
Spreadsheet Compare runs only in Excel for Windows, and only in some editions. Below are four methods and what each one shows. Then comes the order in which to read the differences in a financial model.
What can change between two versions
A model can change in three ways:
- Inputs. Someone typed a new value: a price, a rate, a date.
- Formulas. Someone edited the logic: a new range, a new lookup, a fixed bug.
- Structure. Someone added a sheet, hid a sheet, inserted rows, added a link to another file or changed a macro.
One input change can move hundreds of calculated cells. Microsoft’s example file shows this. Four entered values in E2:E5 changed. That also changed the calculated values in F2:F4 and E6:F6. The same file has one changed formula. The old F5 summed only B5:D5. The new F5 is =SUM(B5:E5).
So a raw count of differences tells you little. A list of 400 changed cells can come from four new inputs and one fixed formula. The work is to separate the cause from the effect.
How to compare two Excel workbooks with Spreadsheet Compare
Microsoft says Spreadsheet Compare is available only in Excel for Windows in Microsoft 365 Apps for enterprise plans and equivalent editions. If you have it, use it first.
- Open both workbooks in Excel. Select Inquire → Compare Files. If the Inquire tab is missing, turn on the Inquire add-in.
- Next to “Compare”, choose the earlier version. Next to “To”, choose the later version.
- Select OK to run the comparison.
The Spreadsheet Compare window has options in its left pane, such as Formulas, Macros and Cell Format, or Select All. Use them to choose what the results show.
If you see the message “Unable to open workbook”, one of the files may have a password. Select OK and enter the password.
The result is a grid of two panes. The left pane is the “Compare” file and the right pane is the “To” file. A lower pane lists each difference, and a legend in the lower left explains the colours. Entered values that changed have a green fill. Calculated values that changed have a blue-green fill.
Some details are useful in a review:
- Hidden worksheets are compared too, so a change on a hidden sheet does not escape.
- The comparison includes VBA code, so a changed macro shows up.
- Home → Export Results saves the list of differences to a file. Keep it with the review file.
Microsoft has the full steps. See its guide.
Other ways to compare two Excel files
Without Spreadsheet Compare, three methods remain. Each one shows less, so know what it misses.
Show Changes, for a shared file
If the model is a shared file that people edit in Excel, use Review → Show Changes. The pane lists who changed which cell, when, and the previous value. The newest changes are at the top. You can filter the list to a sheet or a range.
Show Changes has limits. It shows changes to values and formulas, including moved, sorted, inserted and deleted cells. It does not show changes to charts, PivotTables, formatting, hiding or filtering. Edits made in an older or one-time purchase version of Excel are not tracked. Saving a copy or replacing the file also clears the pane. For older changes, use File → Info → Version History. Microsoft lists the details. Read its Show Changes page.
A difference sheet with formulas
This works in any Excel. Open both files. Then open a third, empty workbook. In cell A1 of its first sheet, enter the formula below. Change Model_v6.xlsx, Model_v7.xlsx and Calc to your file names and your sheet name. The formula compares the values of the same cell in both versions:
=IF([Model_v6.xlsx]Calc!A1=[Model_v7.xlsx]Calc!A1,"",
"v6: "&[Model_v6.xlsx]Calc!A1&" | v7: "&[Model_v7.xlsx]Calc!A1)
On a second sheet, compare the formulas as text:
=IF(IFNA(FORMULATEXT([Model_v6.xlsx]Calc!A1),"")=
IFNA(FORMULATEXT([Model_v7.xlsx]Calc!A1),""),"","formula changed")
Fill both formulas across the used range of the sheet. A blank cell means no change. Know four traps:
- FORMULATEXT returns #N/A for a cell with no formula. The IFNA turns that into an empty text, so a typed value that replaced a formula shows as “formula changed”. That is what you want.
- FORMULATEXT also returns #N/A when sheet protection hides the formula. Remove the protection first, or those cells look equal.
- The sheet compares cells by address. One inserted row moves every cell below it, and the sheet fills with differences. Find the first row that differs and compare from there.
- A blank cell and a zero compare as equal. A zero that someone deleted does not show.
To read all formulas of one file on screen, see how to show all formulas in Excel.
View Side by Side, for a quick look
To look at two files together, open both and select View → View Side by Side. Then turn on Synchronous Scrolling, so both windows move together. Synchronous Scrolling works only while View Side by Side is on. Side by Side finds nothing by itself. It suits a check of one sheet after another method found the changes.
Read the differences like a model reviewer
A list of differences is raw material. Read it in this order, from the cause to the effect.
- Changed inputs. Each one is a decision. Ask for the source of each new value.
- Changed formulas. These carry the most risk. A formula that changed in one cell but not in its neighbours breaks the pattern of the row. The inconsistent formulas guide covers that case.
- New hardcoded numbers. A cell that held a formula and now holds a typed number is a common source of error. Spreadsheet Compare can also help you find manually entered totals.
- Structure. New sheets, hidden sheets, new external links, changed names and changed macros.
- Key outputs. List the key outputs of both versions. Each change in an output must follow from the changes above.
Our article on how to find hardcoded numbers in Excel covers step 3 in detail.
Formula Audit XL does not compare two workbooks. It checks one workbook at a time.
You can still use it in a version review. Run Model Check (Ctrl + Shift + R) on each version. Each run writes a _ModelCheck sheet with counts of errors, circular references, broken external links, hardcoded numbers, hidden sheets and more. It does not change the existing sheets. Put the two scorecards side by side. If the count of hardcoded numbers went up, find each new one. Run Spreadsheet Compare first. The _ModelCheck sheet is a new sheet, so a later compare shows it as a difference.
Our page on the Excel Inquire alternative explains where Spreadsheet Compare is the better tool.
The Excel model review checklist puts this version check in stage 5. The financial model audit guide covers the rest of the audit.
Keep a change log for the next compare
A compare tells you what changed. It does not tell you why. The builder knows why, so ask for a change log with each version. Each line gives the version, the date, the author, the change and the sheets affected. A short Changes sheet in the file is enough.
With a log, the compare becomes a test. Each difference on the list must match a line in the log. A difference with no line in the log is the first thing to ask about. Our article on how to document an Excel model includes a template for the log.
To check each version before you sign it off, download Formula Audit XL and start the 7-day free trial.
Frequently asked questions
How do I compare two Excel workbooks for differences?
Use Spreadsheet Compare if you have it: Inquire, Compare Files. It shows both files in a grid and lists each difference in a lower pane. Without it, use Review, Show Changes for a shared file, or build a difference sheet with formulas while both files are open.
Which Excel versions include Spreadsheet Compare?
Microsoft says Spreadsheet Compare is available only in Excel for Windows in Microsoft 365 Apps for enterprise plans and equivalent editions. It is not in Excel for Mac or Excel for the web. If you have the right edition and the Inquire tab is missing, turn on the Inquire add-in.
Can I compare the formulas, not only the values?
Yes. Spreadsheet Compare has options for formulas, macros and cell format. With formulas only, use FORMULATEXT on the same cell in both files and compare the text. Wrap it in IFNA, because FORMULATEXT returns #N/A for a cell with no formula.
Why does my difference sheet show changes in every row?
A formula comparison matches cells by address. If someone inserted or deleted a row in the new version, every cell below it moves, so each one looks changed. Find the first row that differs, then compare the two files again from the rows that match.