You can compare two Excel files to spot differences in data, formulas, or formatting by using built-in features or third-party tools—most methods require only the files themselves and Excel (or another spreadsheet program) installed.

What You'll Need

  • Two identical Excel files (same structure, columns, and layout). If the files differ in structure, you’ll need to prepare them first (see "Troubleshooting").
  • Microsoft Excel 2016 or later (works on PC, Mac, or online via Excel for the web). For older versions, see the limitations in the "Troubleshooting" section.
  • Optional: A third-party add-in like Compare Plus or Document Compare for advanced features (free/paid).

Step-by-Step

  1. Open both files in Excel. You have two options:
    1. Method 1: Side-by-Side Comparison (No Add-Ins)
      1. Open File 1 in Excel.
      2. Open File 2 in a new window by clicking File > Open, selecting the second file, and opening it. Use the Window tab (or View > New Window on Mac) to split the screen.
      3. Arrange the windows side by side by dragging each window to a corner of the screen. On Windows, use the Window > Arrange All option to auto-split.
      4. Compare each cell manually or use the Track Changes feature (see Step 3) if you’re working with edits.
    2. Method 2: Built-In Document Compare Tool
      1. Open File 1 and go to Review > Compare > Compare (or Review > Track Changes > Compare in older versions).
      2. Select File 2 from the dropdown or browse to find it.
      3. Choose comparison options:
        • Track Changes highlights edits (red for deletions, blue for insertions).
        • All Changes shows every difference, even formatting.
        • Ignore Changes to Formatting (if you only care about data).
      4. Click OK. Excel generates a comparison report with a Changes tab showing all discrepancies. Use Review > Accept or Reject to merge changes if needed.
  2. Use conditional formatting to highlight differences (for manual checks):
    1. In a merged comparison sheet (or one file), select the data range you want to compare.
    2. Go to Home > Conditional Formatting > New Rule.
    3. Choose Use a formula to determine which cells to format and enter: =A1<>B1 (assuming File 1 is in column A and File 2 in column B). Replace with your actual ranges.
    4. Set a fill color (e.g., red) and click OK. All mismatched cells will now be highlighted.
  3. Export the comparison to CSV or PDF (for sharing):
    1. After running the Compare tool, go to File > Save As and choose CSV (Comma delimited) or PDF.
    2. Attach the file to an email or upload it to cloud storage for review.
  4. Leverage third-party tools for advanced users:
    1. Install an add-in like Compare Plus from the Excel Store (free version available).
    2. Open both files, then go to the add-in’s ribbon and select Compare.
    3. Choose comparison settings (e.g., ignore blanks, compare formulas only) and generate a report.
    These tools often support batch comparisons and more detailed logging.

Common Mistakes

  • Assuming files are identical in structure. If column headers or rows differ, the comparison will fail or produce false positives. Always verify the layout matches before proceeding.
  • Ignoring hidden cells or merged ranges. Hidden data or merged cells can throw off comparisons. Use Home > Format > Hide & Unhide to check for hidden rows/columns.
  • Overlooking formatting differences. Two cells with the same value but different fonts, colors, or borders will appear as mismatches. Use Review > Compare > Ignore Changes to Formatting if formatting isn’t critical.
  • Not saving a backup before merging. If you accept changes in the Compare tool, you’ll overwrite File 1’s data. Always save a copy first (use File > Save As with a new name).
  • Using outdated Excel versions. The Compare tool was introduced in Excel 2016. Older versions require manual methods (e.g., VLOOKUP formulas) to detect differences.
  • Skipping data validation checks. If files contain dates, times, or formulas, ensure they’re formatted the same. For example, a date in MM/DD/YYYY in File 1 and DD/MM/YYYY in File 2 will appear as mismatches.

Tips

  • Use tables for structured comparisons. Convert your data to Excel Tables (Insert > Table) before comparing. Tables maintain structure and let you filter/sort mismatches easily.
  • Compare incrementally. If files are large, compare one sheet or section at a time to save time and avoid confusion.
  • Leverage PivotTables for summary comparisons. After identifying mismatches, create a PivotTable to summarize patterns (e.g., "which rows are most frequently different?").
  • Automate with VBA macros. For repetitive comparisons, record a macro (press Alt + F11 to open the VBA editor) to streamline the process.
  • Check for circular references. If files reference each other (e.g., =Sheet2!A1), the comparison tool may freeze or misreport changes.
  • Use Excel’s "Go To Special" feature (Home > Find & Select > Go To Special) to quickly locate errors like blank cells, errors (#N/A, #DIV/0!), or formulas.

Troubleshooting

If the comparison doesn’t work as expected:

  • Files have different structures:
    1. Manually align columns by copying data from File 2 into File 1 (or vice versa) in the same order.
    2. Use Data > Sort to rearrange rows if they’re out of order.
  • Excel crashes or hangs during comparison:
    1. Close all other programs to free up RAM.
    2. Try comparing smaller sections of data (e.g., 100 rows at a time).
    3. If using a third-party add-in, update it to the latest version.
    4. For very large files (>10,000 rows), consider using Power Query (Data > Get Data) to merge and compare data externally.
  • False positives (e.g., dates or times appear different):
    1. Check if cells are formatted differently. Right-click a cell > Format Cells to compare formats.
    2. Convert dates/times to text (e.g., =TEXT(A1,"yyyy-mm-dd")) before comparing.
  • Comparison tool not available (Excel 2013 or earlier):
    1. Use a manual method like VLOOKUP or IFERROR formulas to flag mismatches. Example: =IF(A1<>B1, "MISMATCH", "") Place this in a third column to highlight differences.
    2. Download a free comparison tool like Spreadsheet Compare from third-party sites.
  • Macros or add-ins disabled:
    1. Enable macros via File > Options > Trust Center > Macro Settings (set to "Enable all macros" for testing).
    2. For add-ins, go to File > Options > Add-ins and ensure the comparison tool is checked.
  • Network or file corruption issues:
    1. Save both files to your local drive instead of cloud storage (e.g., OneDrive or SharePoint) to avoid connectivity delays.
    2. Repair corrupted files using File > Info > Check for Issues > Repair.

Frequently Asked Questions

Can I compare Excel files without Excel installed?

No. While some online tools (like Google Sheets or third-party web apps) offer comparison features, they require uploading your files. For privacy, always compare locally on your PC/Mac using Excel.

How do I compare Excel files with merged cells?

Merged cells can cause errors in comparisons. Split them first: select the merged area, right-click, and choose Split Cells. Then proceed with your comparison method.

Will the comparison tool show why data differs?

Yes, but with limitations. The Compare tool highlights changes but doesn’t explain them (e.g., "this value was edited on 5/15"). For context, check the Audit Worksheet (Formulas > Audit Tools > Audit Worksheet) to trace formula dependencies.

Can I compare Excel files with different numbers of rows?

Yes, but you’ll need to align them manually. Add blank rows to the shorter file or use Excel’s Insert > Rows command to match lengths before comparing.

Is there a way to compare Excel files automatically via email?

Not natively, but you can:

  1. Use Power Automate (Microsoft’s automation tool) to trigger a comparison when a file is sent via email.
  2. Upload files to a cloud service (e.g., OneDrive) and enable automated alerts for changes via File > Info > Versioning.
  3. Use third-party services like Diffchecker (online) to compare files uploaded from your email attachments.

How do I compare Excel files with protected sheets?

Unprotect the sheets first: right-click the sheet tab > View Code (if macros are locked) or use Review > Protect Sheet to remove the password. If you don’t have the password, you’ll need to recreate the file or use a third-party unlocker (use cautiously).