How do I compare two Excel sheets and find the differences
Use Spreadsheet Compare for whole workbooks, a formula or Power Query anti join for rows, and View Side by Side only when you want to look yourself.
Smalt AI team ·
The quickest way to compare two Excel workbooks is Spreadsheet Compare: open the Inquire tab in Excel for Windows, choose Compare Files, and pick both files. For two sheets with the same layout, paste both tables side by side on one sheet and use a formula such as =A2<>E2 to flag each changed cell. For lists in a different order, match on an ID column or use a Power Query anti join.
| Method | Best for | Needs | What it detects |
|---|---|---|---|
| Spreadsheet Compare | Two versions of a workbook | Excel for Windows, Microsoft 365 Apps for enterprise or equivalent | Values, formulas, named ranges, formats, hidden sheets |
| Formula or conditional formatting | Same layout, same row order | Any Excel | Cells whose values differ |
| Power Query anti join | Rows missing from the other list | Power Query | Keys with no match in the other table |
| View Side by Side | A quick visual read | Excel | Nothing, you look |
Compare two whole workbooks with Spreadsheet Compare
Spreadsheet Compare reads both files and reports what changed. Microsoft’s guide to comparing two versions of a workbook gives the steps, and the Spreadsheet Inquire page covers the same ground from inside Excel.
- Open Excel and go to the Inquire tab.
- Select Compare Files.
- Choose the two files, then select OK.
If the Inquire tab is missing, turn on the Inquire add-in first.
The result is a two-pane grid with colour-coded differences. It reports changes in values, formulas, named ranges and formats, and it includes hidden sheets. Any VBA differences appear in a separate window. You can export the results to Excel.
According to Microsoft, this tool is only in Excel for Windows, and it needs Microsoft 365 Apps for enterprise or an equivalent edition. On a Mac or a basic licence, use one of the methods below.
Flag changed cells with a formula
When both sheets have the same layout and the rows are in the same order, a helper column does the job. Paste both tables side by side on one sheet, with the old data in columns A:C and the new data in columns E:G. In a spare area, such as columns I:K, enter =A2<>E2 and fill it across and down. Every cell that differs returns TRUE. The <> operator ignores upper and lower case, so use =NOT(EXACT(A2,E2)) if a case-only change matters. Conditional formatting with the same comparison as its rule highlights the differences in place instead.
This is general spreadsheet technique rather than a documented Excel feature, and it breaks as soon as one row is inserted: everything below shifts by one and reports a difference.
If the rows are sorted differently, match on a unique ID instead. Look up each ID from sheet one in sheet two (with XLOOKUP, or VLOOKUP in older Excel versions that lack XLOOKUP) and compare the fields that come back. If duplicates are the worry, see how to find duplicate invoices and payments in Excel. IDs that return an error exist in one sheet only.
Find rows that exist in one list but not the other
For two lists where the question is “what is in A that is missing from B”, Power Query is cleaner than formulas. Load both tables into Power Query, then merge them. Microsoft’s documentation on the left anti join says this join kind keeps only the rows in the left table that have no match in the right table.
Pick the key column in each table, set the join kind to Left anti, and the output is the rows in sheet one that are not in sheet two. To see the opposite direction, swap the two tables, or use the right anti join. Run both directions if you need a full picture, because one pass only tells you about one side.
To highlight missing items in place, Exceljet’s guide to comparing two lists uses a COUNTIF-based rule that counts each item of list 1 in list 2. A count of zero means the item is not in list 2. Repeat with the lists swapped for the other direction. The lists need not be the same length.
An anti join compares the key you chose and nothing else. A row whose ID appears in both tables but whose amount changed will not show up. For that, merge on the ID and compare the other columns afterwards.
Look at two sheets side by side
When you only need to read two sheets next to each other, use View > View Side by Side. Microsoft’s page on comparing worksheets notes that for two sheets in the same workbook you select View > New Window first, then switch to the other sheet in the new window. Synchronous Scrolling only works while Side by Side is on.
This method is visual only, so it suits a quick look and not a check you need to trust.
Doing it with an AI coworker
If you would rather not build any of this, you can hand a reconciliation to Smalt, your AI coworker. You would upload the sheets and make the request in plain words, for example: “Reconcile these two sheets, matching on Order ID.” You would ask for an Excel workbook with the exceptions flagged, so you have a file to review and send on. For a pile of source documents instead of two sheets, see how to pull invoice PDFs into one Excel spreadsheet.
What to check before you rely on it
False differences can swamp a comparison. Trailing spaces and numbers stored as text both make two values that look identical register as different. Clean those first with TRIM, or convert the text to numbers, before you compare. Otherwise a large comparison can bury the real changes under cosmetic ones.
Decide what counts as a difference before you start. Spreadsheet Compare reports formats and formulas as well as values, so expect more output than a values-only formula check gives you.
Check duplicates in your key column. If an ID appears twice in one sheet, both lookups and anti joins can give misleading results for that ID.
Whichever method you use, spot-check a few flagged rows and a few unflagged ones against the originals. No differences reported may simply mean the wrong column was matched.
Smalt is an AI coworker that takes jobs like this end to end and hands back the finished file.