In Excel: open both files, use View ▸ View Side by Side with Synchronous Scrolling for a visual pass, and put =IF(EXACT(Sheet1!A1,Sheet2!A1),"","DIFF") on a third sheet for a cell-by-cell answer.
On this page7
Decide first whether the sheets are the same grid (compare cell by cell) or two keyed lists (compare by key).
For an identical grid: add a third sheet and enter =IF(EXACT(Sheet1!A1,Sheet2!A1),"","DIFF") in A1, then fill across and down to cover the range.
For keyed lists: use =XLOOKUP(A2, Sheet2!$A:$A, Sheet2!$C:$C, "not found") to pull the other file's value beside each key and compare the two columns.
To highlight in place instead, select the range on Sheet1 and add Home ▸ Conditional Formatting ▸ New Rule ▸ Use a formula: =A1<>Sheet2!A1.
For a side-by-side read of two open workbooks, use View ▸ View Side by Side and turn on Synchronous Scrolling.
What this does
Which method fits depends on what "different" means to you. A formula sheet that mirrors the two ranges and flags mismatches is exact, auditable and works in every Excel version. Conditional formatting with a formula rule highlights the differences in place. View Side by Side is a human eyeball check, not a report. And if both sheets are keyed lists rather than identical grids, the honest comparison is a lookup on the key — XLOOKUP or COUNTIF — because row 40 in one file is rarely row 40 in the other. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “compare two excel files”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Two versions of the same price list sit in Sheet1 and Sheet2, both A1:D500. On a new sheet, A1 = =IF(EXACT(Sheet1!A1,Sheet2!A1),"","DIFF") filled across to D and down to row 500. Every cell that differs reads DIFF; Ctrl+F for "DIFF" or filter the column to jump to them. If instead the two lists share a SKU key but not a row order, use =IF(COUNTIF(Sheet2!$A$2:$A$500, A2)=0, "missing in v2", "") down the key column. Two versions of the same file turn up constantly — before and after an edit, your copy and a colleague's, this month's export and last month's — and eyeballing them is exactly where the missed change hides. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Function availability: XLOOKUP: Excel 2021+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “compare two excel files”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Using = instead of EXACT, which reports "Paris" and "paris" as identical because = is case-insensitive.
- Comparing row by row when the two files are sorted differently — every row after the first insert reads as changed.
- Ignoring trailing spaces from an export; wrap both sides in
TRIMbefore comparing. - Comparing displayed values rather than underlying ones, so two cells showing 1.5% differ in the 6th decimal and nothing tells you.
- Assuming a visual side-by-side scroll caught everything on a 500-row sheet.
Frequently asked questions
How do I compare two Excel files for differences?
If they share a layout, put =IF(EXACT(File1cell, File2cell),"","DIFF") on a third sheet and fill it over the range. If they are keyed lists, match on the key with XLOOKUP or COUNTIF instead of by row position.
Is there a built-in compare tool?
Spreadsheet Compare ships with Office Professional Plus and Microsoft 365 Apps for enterprise on Windows, and produces a full change report. It is not in Excel for Mac or the standard consumer editions.
How do I highlight the differences instead of listing them?
Select the range, then Home ▸ Conditional Formatting ▸ New Rule ▸ Use a formula to determine which cells to format, and enter =A1<>Sheet2!A1 with a fill colour.
Why does my comparison flag rows that look identical?
Almost always trailing spaces, numbers stored as text, or a date held as text on one side. Compare =TRIM(A1) against =TRIM(Sheet2!A1) and check the two cells' data types.
Other ways people ask this
On the way here you may have searched this as “how to compare two excel files”, “how can i compare two excel files”, “two excel files compare” and “how to join two excel files” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to compare two excel files”, “how can i compare two excel files”, “two excel files compare” all point at the one operation explained on this page, which is why they all lead here.