Can You Compare Excel Files? Methods and Limits

How-to basics · Updated November 19, 2026

Yes. You can compare Excel files with Microsoft’s Spreadsheet Compare utility, formulas, or Power Query; the best choice depends on whether you need to find cell-by-cell changes, match records that have moved, or review a workbook’s history. Excel does not offer the same built-in comparison tools in every edition, so first identify what kind of difference you need to detect.

What comparing Excel files can reveal

A comparison can flag differences in cell values, formulas, formatting, or workbook structure, depending on the method. It can also identify records that exist in one file but not the other. These are different questions: a cell-by-cell comparison asks whether two cells at the same position match, while a record comparison asks whether the same item appears in both files, even if it has moved to another row.

For example, imagine last month’s and this month’s inventory workbooks. If each product remains on the same row, comparing corresponding cells may be enough. If the rows were sorted differently, that approach could report many apparent changes. Matching the files by a unique product ID is more reliable in that case.

  • Values: numbers, dates, and text displayed or stored in cells.
  • Formulas: the calculations entered in cells, which may differ even when their displayed results match.
  • Formatting: number formats, fonts, fills, and other visual settings.
  • Structure: changes such as added or removed worksheets, depending on the comparison tool.
  • Records: rows that were added, removed, or changed when matched by an identifying field.

No single comparison method necessarily checks all of these. Choose the method after deciding whether you care about formulas or results, whether row order is stable, and whether formatting matters.

Use Spreadsheet Compare for a workbook report

Spreadsheet Compare is a Windows desktop utility designed to compare two Excel workbooks. It can present differences in a dedicated results view rather than requiring you to build a comparison sheet yourself. Its available options can include comparisons of cell values, formulas, and formatting, as well as workbook-level items. The exact features depend on the installed version and configuration.

Availability is the main caveat: Spreadsheet Compare and the Inquire tools are included only with certain Office editions and organizational deployments, not every Excel subscription or installation. They are commonly associated with some Office Professional Plus and Microsoft 365 enterprise installations. If the utility is not present, that does not mean your workbook is incompatible; it may mean the installed edition does not include the tool.

On Windows, look in the Start menu for Spreadsheet Compare. In supported Excel installations, the Inquire tab may also provide a Compare Files command. If that tab is missing, check File > Options > Add-ins. In the Manage box, choose COM Add-ins, select Go, and see whether Inquire is available to enable. If neither the tool nor the add-in is available, use another method or ask your organization’s administrator about the Office edition.

After choosing the two workbooks, review the results by difference type and inspect the relevant cells in context. A report is a starting point, not a judgment about which value is correct. A changed formula may be an intentional update, and a changed format may have no effect on the underlying data.

Compare matching cells with formulas

For two worksheets with the same layout, a simple formula can mark whether corresponding cells have equal values. First, make a copy of each sheet in one workbook and name them Old and New. This avoids fragile references to separate files that might be moved or renamed.

With the old data in Old!A1:D100, the new data in New!A1:D100, and a comparison sheet ready, enter this formula in Compare!A1, then fill it across and down to cover the area:

=Old!A1=New!A1

The formula returns TRUE when the two cells’ values are equal and FALSE when they are not. For instance, if Old!A1 contains 25 and New!A1 contains 25, the result is TRUE; if New!A1 contains 26, it is FALSE. This tests the values Excel evaluates, not whether the formulas themselves are identical. Two different formulas can return the same result.

Blank cells can also require thought: Excel may treat a truly empty cell and a formula returning an empty string as equal in this kind of comparison. If that distinction matters, inspect the formulas or use a tool that can compare formulas explicitly. If you want a visual scan, apply conditional formatting to a comparison range after testing your logic on a few known cells. A formula-based highlight rule can flag differences, but its cell references must align with the selected range.

Match records when rows have moved

When rows can be sorted or inserted, compare using a stable key such as an invoice number or product ID. The key should be unique in each workbook; duplicate IDs make it unclear which record should match. The following example uses XLOOKUP, available in Microsoft 365 and Excel 2021 or later.

Assume the old workbook’s data has IDs in Old!A2:A1000 and amounts in Old!B2:B1000. The new sheet has IDs in New!D2:D1000 and amounts in New!E2:E1000. Enter this in Old!C2 and fill down:

=IFERROR(IF(B2=XLOOKUP(A2,New!$D$2:$D$1000,New!$E$2:$E$1000),1,0),-1)

The result is 1 when the ID is found and its amount matches, 0 when it is found but the amount differs, and -1 when XLOOKUP cannot find the ID. For example, if ID P104 has an amount of 80 in both sheets, the result is 1; if the new amount is 85, it is 0; if P104 is absent from the new sheet, it is -1. This example assumes each ID appears no more than once in the new list. XLOOKUP returns the first match, so duplicate keys need resolving before relying on the result.

This formula checks only the specified amount column. Repeat the comparison for other fields that matter, such as description or status. To find records added to the new file, also check the new IDs against the old ID column; checking only old-to-new matches identifies missing old records but not every addition.

Use Power Query for larger or repeatable comparisons

Power Query is useful when the files contain many rows, when the comparison will be repeated, or when you need a list of added and removed records. In Excel for Microsoft 365 on Windows, import each workbook through Data > Get Data > From File > From Excel Workbook. In Power Query, confirm that the key columns have compatible data types, then use Home > Merge Queries to join the two tables on their matching ID fields.

A left anti join returns rows from the first table that have no match in the second; a right anti join returns rows from the second that have no match in the first. These can help identify removals and additions. An inner join keeps matching keys, after which you can expand the new table’s columns and compare the fields of interest. For a recurring report, refresh the queries after replacing or updating the source files.

Power Query is not a magic detector of every workbook change. It compares the data you import and the columns you select; it does not automatically report every difference in formulas, cell formatting, comments, or workbook layout. It is strongest for structured tables and record-level analysis. Excel for the web has a more limited authoring experience for Power Query than desktop Excel, so use the Windows desktop app for these setup steps.

Choose a method based on the job

  • Same layout, quick check: use a comparison formula or conditional formatting when each cell has a clear counterpart.
  • Detailed workbook-level review: use Spreadsheet Compare if it is included with your Windows Office installation.
  • Rows may have moved: match on a unique key with XLOOKUP or Power Query rather than comparing row positions.
  • Large or recurring data checks: use Power Query so the import and matching steps can be refreshed.
  • Need to know who changed a shared file and when: check version history, which answers a different question from a cell-by-cell comparison.

Excel for Mac does not provide the Windows Spreadsheet Compare workflow in the same way, so formulas or Power Query may be more practical alternatives. Excel for the web also does not provide the full Windows desktop comparison utility. Features can vary by license and update channel, so verify what is available in your installed edition before planning a process around a particular command.

Version history is not the same as file comparison

If a workbook is stored in OneDrive or SharePoint, version history may let you review or restore an earlier saved version, subject to the service and your permissions. In Excel, look under File > Info > Version History when that option is available. This can help answer when a saved version existed or recover earlier work, but it is not always a side-by-side report of every cell change.

Likewise, comments and collaboration indicators may help explain edits, but they do not replace a deliberate comparison between two separate workbook files. Keep dated copies or use an approved shared storage location if you need an audit trail. Do not assume that a comparison report proves who made a change; authorship and version records are separate evidence.

Common comparison problems and how to avoid them

A reported difference may be genuine, or it may arise from inconsistent data or assumptions. Before acting on a result, check the following:

  • Different row order: positional formulas compare unrelated records if the lists are sorted differently. Match by a unique ID.
  • Numbers stored as text: a value such as 100 stored as text may not behave like the numeric value 100. Standardize types before comparing.
  • Dates and precision: dates are stored as serial numbers, and decimal calculations can involve tiny floating-point differences. Consider whether exact equality is appropriate for the task.
  • Formula versus result: equal displayed results do not establish that the formulas are the same. Inspect formula text when calculation logic matters.
  • Formatting and display: 0.5 and 50% can represent the same numeric value but display differently; a value-only check may miss that formatting change.
  • Duplicates, blank keys, or missing IDs: these undermine one-to-one record matching. Clean or flag them before interpreting results.
  • Hidden content: hidden rows, columns, and sheets can contain data that a quick visual review overlooks. Check the whole relevant range and workbook structure.

For important work, preserve the originals and compare copies. Confirm a handful of reported matches and differences manually, including an added record, a removed record, and a changed value. That small validation step can reveal a misaligned range or a mistaken key before you rely on the full report.

Privacy and safe handling

Workbooks can contain personal information, payroll details, customer data, or confidential business figures. A local Excel feature or desktop Power Query workflow can avoid uploading the files to an unrelated comparison website. Before using an online service or third-party add-in, check where files are stored, who can access them, how long they are retained, and whether your organization permits that service. Remove or mask sensitive information when it is not needed for the comparison.

Also treat downloaded comparison tools and macros cautiously. Use software approved by your organization and avoid enabling macros in an unfamiliar workbook just to compare files. Comparison itself should not require changing the source workbooks; keeping untouched originals makes it easier to verify results or recover from an accidental edit.

Frequently Asked Questions

Can Excel compare two files side by side?
Yes. You can open both workbooks and arrange their windows for visual review, or use Spreadsheet Compare if your Windows Office edition includes it. Side-by-side viewing helps inspection but does not automatically identify every difference.

Can I compare Excel files without installing an add-in?
Yes. Copy the relevant sheets into one workbook and compare corresponding cells with formulas, or import the data into Power Query. These approaches do not require a third-party add-in, although the most suitable option depends on whether the rows share the same layout.

Can Excel tell me which rows were added or deleted?
Yes, if you compare a stable, preferably unique key in both files. XLOOKUP or a Power Query anti join can identify keys present in one list but absent from the other. A cell-by-cell comparison alone may mistake a row insertion for many changes.

Does a value comparison detect changed formulas?
Not necessarily. A comparison that evaluates cells may show the same result for two different formulas. Use a formula-aware comparison tool or inspect the formulas themselves when the calculation logic is what matters.

Can Excel for Mac compare workbooks?
You can compare data with formulas or Power Query where available, but the Windows Spreadsheet Compare utility is not a standard equivalent on Mac. Availability of specific features depends on the Excel version and license.

Is Spreadsheet Compare included with every Microsoft 365 plan?
No. Its availability depends on the Office edition and deployment. Check the Start menu and Excel’s available add-ins, or confirm your organization’s license details with its administrator.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.