FormulaGuard

How to compare formulas between two Excel files

Comparing only the numbers on screen misses the change that matters most. Say cell B10 held =SUM(B2:B9) and showed 100, and someone typed 100 over it. Both versions look identical, but the new one will not update when B2 changes. To catch this you have to compare formulas.

This page is published by the makers of FormulaGuard, the tool in method 4. Methods 1 to 3 do not need it.

1. Show formulas and read them side by side

In each workbook press Ctrl + ` (the key above Tab) to switch between results and formulas, then arrange the two windows next to each other. This works for a short sheet. On anything larger it is easy to miss one changed cell.

2. Flag differences with FORMULATEXT

FORMULATEXT returns a cell's formula as text. Keep both workbooks open, add a new sheet, enter this in cell A1 and fill it across the range you want to check. Replace the file and sheet names with yours.

=IFERROR(FORMULATEXT('[old.xlsx]Sheet1'!A1), '[old.xlsx]Sheet1'!A1&"")<>IFERROR(FORMULATEXT('[new.xlsx]Sheet1'!A1), '[new.xlsx]Sheet1'!A1&"")

TRUE marks a cell that differs, either in its formula or, for cells without one, in its value. The limits:

3. Use Microsoft Spreadsheet Compare

Spreadsheet Compare puts two workbooks next to each other and highlights differences in values, formulas, formatting and macros. Microsoft states it is available “only in Excel for Windows”, in Microsoft 365 Apps for enterprise and equivalent editions (source). On a Mac, see Spreadsheet Compare on a Mac.

4. Check the two versions with FormulaGuard

Open FormulaGuard and drop in the original and the changed workbook (.xlsx, .xlsm, .xlsb, .xls or .ods). It lists:

Its Smart Row Align mode is meant for versions where rows were inserted or deleted. Workbooks are read inside your browser and are not uploaded. It does not compare cell formatting or VBA macros. The free web app checks up to 2 worksheets and 500 rows per sheet. Its report is watermarked and lists up to 12 critical or high findings. Pro is a one-time $29. The command-line version needs Node.js 18 or later and checks every sheet and row for free:

npx formulaguard before.xlsx after.xlsx

Compare two workbooks

Which method fits

Your situationMethod
A few dozen cells1. Show formulas
Same layout, one sheet, no extra tool2. FORMULATEXT
Windows with an eligible edition, formatting matters3. Spreadsheet Compare
You want broken formulas ranked by risk, in a web browser4. FormulaGuard

Keep an untouched copy of the original before anyone edits it. Every method here needs both versions.

Related: Spreadsheet Compare on a Mac · Check if ChatGPT or Claude overwrote Excel formulas.