Compare 2 Excel Files for Differences

There are two ways to “compare 2 excel files for differences”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above with a tool to test it; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

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.

ƒxCompare Two ListsLive
Values in both lists
2

Only in A: 2 · Only in B: 1

=COUNTIF(B:B,A2)>0
=IF(EXACT(Sheet1!A1,Sheet2!A1),"","DIFF")
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

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. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “compare 2 excel files for differences” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. 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. That turns a data step that keeps your analysis trustworthy into a method you can reuse, explain, and defend when the workbook leaves your screen.

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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Here is the takeaway for “compare 2 excel files for differences”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

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 TRIM before 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.