How to compare two Excel files for differences
29 November 2026
To compare two Excel files, you can put them side by side and scroll, use a formula that flags every cell that doesn't match, use conditional formatting to highlight differences, or use a comparison tool that lines up the rows for you. Which one works depends on one question: were any rows inserted, deleted or re-sorted between the two versions? If not, the free methods below work well. If they were, cell-by-cell methods break, and you need something that matches rows first.
1. View the two files side by side
Good for: a quick look at small files.
In Excel for Windows, open both workbooks, then go to View > View Side by Side. Turn on Synchronous Scrolling in the same group so both windows scroll together. On a Mac, drag the two windows side by side, or use macOS Split View.
This is fine for a few dozen rows. Beyond that, it's easy to miss a changed digit, and you'll get no record of what you checked.
2. Use a formula to flag every different cell
Good for: two sheets with identical layouts, where you want a list of differences.
- Copy both sheets into one workbook, naming them Old and New.
- Add a third sheet called Check.
- In cell A1 of Check, enter:
=IF(Old!A1<>New!A1, "Old: "&Old!A1&" | New: "&New!A1, "")
- Fill the formula right and down to cover the whole data range.
Every cell that differs now shows both values, and matching cells stay blank. You can then filter or search the Check sheet.
The catch: the formula compares cell A5 with cell A5. If someone inserted a row at the top of the new version, every row below it shifts down by one, and the whole sheet lights up as "different".
3. Highlight differences with conditional formatting
Good for: seeing changes in place, in the new version itself.
- Copy both sheets into one workbook, as above.
- On the New sheet, select the data range starting at A1.
- Choose Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
- Enter
=A1<>Old!A1, pick a fill colour and choose OK.
Changed cells are now highlighted. It has the same weakness as the formula method: inserted, deleted or re-sorted rows throw every following comparison out.
4. Use Microsoft's Spreadsheet Compare, if you have it
Good for: Windows users on the right Office edition.
Microsoft makes a proper comparison tool called Spreadsheet Compare, along with the Inquire add-in for Excel. They're only included with Office Professional Plus and Microsoft 365 Apps for enterprise, on Windows. If you have one of those, search the Start menu for Spreadsheet Compare, choose Compare Files, and pick the two workbooks.
If you have Microsoft 365 Business, Personal or Family, or use a Mac, you won't find it, and Microsoft doesn't sell it separately.
5. Match rows by an ID column with XLOOKUP
Good for: lists where rows were added, removed or re-sorted, and each row has a unique ID such as an invoice number, SKU or employee number.
In a new column on the New sheet, look each ID up in the old sheet and compare a value. For example, to check whether the price in column C changed:
=LET(old, XLOOKUP(A2, Old!A:A, Old!C:C, "Not in old"),
IF(old="Not in old", "New row", IF(old<>C2, "Changed from "&old, "")))
Do the same in reverse on the Old sheet to find rows that were deleted. This handles re-sorting, but you need one formula per column you care about, and in older versions of Excel without XLOOKUP and LET you'll need VLOOKUP or INDEX/MATCH instead.
When the free methods stop being worth it
The methods above are fine for an occasional check of a tidy sheet. They get slow and error-prone when:
- rows were inserted, deleted or moved, so a cell-by-cell comparison falls out of line;
- the files have several sheets, or thousands of rows;
- you need to know whether a formula changed, not just its result;
- you need a record of the changes to send to someone or keep on file;
- the files are confidential, so uploading them to a free online comparison site isn't an option.
That's why we made Compare Sheets. You drop in the two files, and it lines up the rows automatically, or matches them by an ID column. It then shows every added, removed, moved and changed row and cell, including formula changes. It runs entirely in your browser on Windows or Mac, so the files never leave your computer. The free version compares the first 1,000 rows of each sheet, and you can try it with sample files first.
Quick answers
Can I compare two Excel files online? Many free sites will, but they upload your files to their servers. For anything with customer, payroll or financial data, use a method that keeps the files on your own computer.
Does Excel have a built-in compare feature? Only in Office Professional Plus and Microsoft 365 Apps for enterprise on Windows (Spreadsheet Compare and the Inquire add-in). Other editions don't include it.
How do I compare two Excel files with rows in a different order? Match the rows by a unique ID column, using the XLOOKUP method above or a tool that matches by key, rather than comparing cell by cell.