Comparing two Excel sheets is a common task in data analysis, auditing, version control, and data reconciliation. Whether you need to find differences between two versions of the same workbook, verify data matches across sources, or audit changes over time, Excel provides several methods. Each method has its appropriate use case depending on the size of your data, the type of comparison needed, and your Excel version.
The five main methods for comparing Excel sheets: Method 1: View Side by Side (visual comparison). Method 2: Conditional Formatting (highlight differences). Method 3: Formulas (VLOOKUP, XLOOKUP, IF). Method 4: Microsoft Spreadsheet Compare tool (advanced comparison). Method 5: Third-party tools (Beyond Compare, Inquire Add-in, etc.). Choose the method that matches your comparison need and Excel version.
Method 1: View Side by Side. The simplest method for visual comparison. Open both workbooks. View tab โ View Side by Side. Both windows display together with synchronized scrolling. You manually scan for differences. Good for small sheets where visual identification works.
Method 2: Conditional Formatting. Highlight differences automatically. Apply formula-based conditional formatting comparing cells in one sheet to cells in another. Differences appear in your chosen color (red, yellow, etc.). Good for medium-sized comparisons where you need to see all differences highlighted.
Method 3: Formula-based comparison. Use VLOOKUP, XLOOKUP, or IF to compare cell by cell. Creates a new column showing differences. Good for systematic data audit where you want to keep a record of what's different. Works with very large datasets.
Method 4: Spreadsheet Compare tool. Microsoft's specialized tool for comparing workbook content, formulas, formatting, etc. Available in Excel 2019+ and Microsoft 365 ProPlus. Shows comprehensive comparison report. Good for in-depth workbook auditing.
Method 5: Third-party tools. Programs like Beyond Compare or Excel-specific add-ins. Provide more features than Excel's built-in options. Cost: free to $50-150 depending on tool. Good for complex audit scenarios.
This guide covers all five methods in detail, when to use each, and how to choose the right approach for your comparison need.
Method 1: View Side by Side. The simplest visual comparison method.
Step 1: Open both workbooks. Open the first Excel file. Open the second file. Both should be visible (you can switch between them via View โ Switch Windows).
Step 2: Activate View Side by Side. Click View tab โ View Side by Side. Both windows arrange together โ typically side-by-side (or top-and-bottom on smaller screens).
Step 3: Enable synchronized scrolling. View โ Synchronous Scrolling (typically on by default). When you scroll one sheet, the other scrolls together. Makes comparing easier.
Step 4: Visually scan for differences. Use synchronized scrolling to compare row by row. Look for: different values in same cells, different formatting, missing rows, extra rows.
Step 5: Adjust window sizes if needed. Resize windows to optimize for comparison. View โ Reset Window Position resets to default.
Step 6: Use Find to locate specific values. Ctrl+F in either sheet to search for specific values you want to compare.
Advantages: Simplest method. No formulas needed. Quick visual identification. Works for any size sheet (though tedious for large).
Limitations: Manual scanning is slow for large datasets. Easy to miss subtle differences. No record of what was different. Time-consuming for spreadsheets with 100+ rows.
When to use: Visual review of a few hundred rows. Quick verification that two sheets look similar. Auditing a small workbook section.
When NOT to use: Large datasets (1000+ rows). Need to verify every cell is identical. Need to create an audit record. Comparing many sheets at once.
Open the two Excel files you want to compare.
Click View tab โ View Side by Side. Both windows arrange together.
View โ Synchronous Scrolling. Scroll one, both scroll together.
Compare row by row. Look for different values, missing rows, format differences.
Ctrl+F to search for specific values in either sheet.
Resize for optimal viewing. View โ Reset Window Position to default.
Method 2: Conditional Formatting to highlight differences. Automated visual identification.
Step 1: Set up your comparison. Both sheets should have the same structure (same columns, same row layout). Copy the second sheet to the same workbook for easier formula reference. Name them clearly (Sheet1, Sheet2, or Comparison1, Comparison2).
Step 2: Select the range to compare. Click Sheet1 (the source). Select the range you want to compare (e.g., A2:D100).
Step 3: Apply Conditional Formatting. Home tab โ Conditional Formatting โ New Rule โ Use formula to determine cells to format.
Step 4: Enter comparison formula. Type: =A2<>Sheet2!A2. (Adjust cell reference to match your data range. The formula compares each cell in Sheet1 to the corresponding cell in Sheet2.)
Step 5: Set the format. Click Format โ choose fill color (red is common for differences). Click OK twice to apply.
Step 6: Verify the result. Cells in Sheet1 that don't match Sheet2 are now highlighted. Visual scan reveals all differences without manual comparison.
Step 7: Apply same to Sheet2 (optional). If you want both sheets highlighted: select Sheet2 range โ same Conditional Formatting โ formula =A2<>Sheet1!A2 (reversed reference).
For more complex comparisons. Compare based on multiple columns: =OR(A2<>Sheet2!A2, B2<>Sheet2!B2). Compare ignoring case: =EXACT(A2, Sheet2!A2)=FALSE. Compare numbers with tolerance: =ABS(A2-Sheet2!A2)>0.01.
Advantages. Automated โ no manual scanning. Visual identification. Works on the existing sheet (doesn't require copying data). Can highlight differences in formats too (with more complex formulas).
Limitations. Only works for cells in the same position. Doesn't help if rows are in different order. No record of which differences are 'important' vs 'expected.'
For different-order data. Use formula-based VLOOKUP comparison (Method 3) instead. View Side by Side won't help with different-order data either.
Method 3: Formula-based comparison with VLOOKUP, XLOOKUP, or IF. Creates audit trail of differences.
Use case. You have two sheets with data. You want to know: which rows are in Sheet1 but not Sheet2 (missing in Sheet2)? Which rows are in Sheet2 but not Sheet1 (added in Sheet2)? For matching rows, are the values the same? Useful for data reconciliation.
VLOOKUP for missing entries. In Sheet1, in a new column (e.g., column E if your data is A-D): =IFERROR(VLOOKUP(A2, Sheet2!A:A, 1, FALSE), "Missing from Sheet2"). Drag down for all rows. Returns the value if found (i.e., row exists in Sheet2), or 'Missing from Sheet2' if not found.
XLOOKUP for missing entries (Excel 365). Cleaner than VLOOKUP: =XLOOKUP(A2, Sheet2!A:A, Sheet2!A:A, "Missing from Sheet2"). Same result but uses modern XLOOKUP function.
Reverse direction. In Sheet2, in a new column: =IFERROR(VLOOKUP(A2, Sheet1!A:A, 1, FALSE), "Missing from Sheet1"). Shows rows in Sheet2 not in Sheet1.
Comparing actual values for matching rows. Use VLOOKUP to retrieve value from Sheet2, then compare: Column F in Sheet1: =VLOOKUP(A2, Sheet2!A:B, 2, FALSE) (assuming column B is the value column). Column G: =IF(B2=F2, "Match", "Different"). Shows whether matching rows have matching values.
Combined approach. Use multiple columns for full audit. Column E: 'Found in Sheet2?' (IFERROR with VLOOKUP). Column F: 'Sheet2 value' (VLOOKUP retrieval). Column G: 'Match?' (IF comparison). Provides complete audit information.
For matching multiple columns. Use SUMPRODUCT or array formulas: =SUMPRODUCT((Sheet2!A:A=A2)*(Sheet2!B:B=B2)*(Sheet2!C:C=C2))>0. Returns TRUE if all three columns match in Sheet2.
Advantages of formula-based comparison. Works on very large datasets. Creates audit trail (you can save and reference). Identifies missing rows in both directions. Compares specific values, not just position. Flexible โ combine multiple criteria.
Limitations. Requires basic formula knowledge. Setup takes time for each comparison. Not as visual as conditional formatting.
When to use. Reconciling data between two systems. Auditing changes to a dataset. Identifying additions/deletions/changes systematically.
In Sheet1: =IFERROR(VLOOKUP(A2, Sheet2!A:A, 1, FALSE), "Missing from Sheet2")
In Sheet2: =IFERROR(VLOOKUP(A2, Sheet1!A:A, 1, FALSE), "Missing from Sheet1")
Modern XLOOKUP: =XLOOKUP(A2, Sheet2!A:A, Sheet2!A:A, "Missing")
Retrieve value: =VLOOKUP(A2, Sheet2!A:B, 2, FALSE)
Compare: =IF(B2 = VLOOKUP(A2, Sheet2!A:B, 2, FALSE), "Match", "Different")
With number tolerance: =ABS(B2 - VLOOKUP(A2, Sheet2!A:B, 2, FALSE)) > 0.01
Match across three columns: =SUMPRODUCT((Sheet2!A:A=A2)*(Sheet2!B:B=B2)*(Sheet2!C:C=C2))>0
Result: TRUE if all three match in Sheet2, FALSE otherwise
Use case: Verifying composite keys or multi-field uniqueness
Highlight differences (same position): =A2<>Sheet2!A2
Highlight if not in other sheet: =ISERROR(VLOOKUP(A2, Sheet2!A:A, 1, FALSE))
Setup: Conditional Formatting โ New Rule โ Use formula โ enter formula โ choose format
Method 4: Microsoft's Spreadsheet Compare tool. Built-in advanced comparison for serious audit work.
Availability. Excel 2013+ on Windows. Office 2016 ProPlus. Office 2019+ Microsoft 365 ProPlus. Not available on Mac. Not in regular Office 365 (Home or Business) subscriptions โ requires ProPlus.
How to access. Search 'Spreadsheet Compare' in your Start menu (Windows). Or in Excel: File โ Inquire (if Inquire Add-in is enabled) โ Compare Files. Standalone application separate from Excel.
What it does. Compares two workbooks comprehensively: cell values, formulas, formatting, defined names, named ranges, conditional formatting, hyperlinks, comments, data validation, VBA code modules, macros, hyperlinks. Identifies every difference between the two workbooks.
Using Spreadsheet Compare. Step 1: Launch the application. Step 2: Click 'Compare Files' button. Step 3: Browse to first workbook (Compare). Step 4: Browse to second workbook (To). Step 5: Click OK. Step 6: View the comparison report.
The report. Shows side-by-side comparison of the two workbooks. Differences are highlighted: green for changes, red for deletions, yellow for additions. Filter to specific categories: cell values, formulas, formatting, etc. Click on highlighted items to see details.
Saving the report. Save as a .XLSX file with all differences documented. Useful for audit trail and sharing comparison results.
Advantages. Comprehensive โ compares everything, not just values. Designed specifically for comparison. Filter and search capabilities. Reports are detailed and shareable.
Limitations. Only Windows. Requires specific Office version. Not designed for end-users โ somewhat technical. Less intuitive than other methods for simple comparisons.
When to use. Auditing complex workbooks. Verifying that changes were intended. Finding all differences (not just specific cell ranges). Pre-audit verification of files. Compliance and documentation.
Alternative: Inquire Add-in. Some Excel versions have the Inquire add-in (File โ Options โ Add-ins โ Manage: COM Add-ins โ check Inquire). Adds 'Compare Files' to the Excel ribbon. Same underlying functionality as Spreadsheet Compare application.
Compares actual data values in cells across both workbooks.
Shows formula differences, not just resulting values.
Detects font, color, border, fill differences.
Compares macros and VBA modules โ useful for code review.
Detects changes to defined names, data validation rules, conditional formatting.
All differences in one place. Filterable. Saveable. Shareable for review.
Third-party tools for sheet comparison. When Excel's built-in methods aren't sufficient.
Beyond Compare. Popular file comparison tool that also handles Excel files. Cost: $30-50 per license. Features: side-by-side view of two files, line-by-line comparison, integrated with version control. Best for: developers and analysts who already use Beyond Compare for other file types.
Excel-specific Compare add-ins. Free and paid add-ins available. ExcelDiff, Spreadsheet Compare (3rd party with same name), various others. Quality varies. Verify before relying on for important work.
SpreadsheetCompare.com online tool. Web-based comparison. Upload your files. Get comparison report. Easy but: requires uploading files to third-party service (privacy concern for sensitive data), file size limits, requires internet connection.
VLOOKUP / XLOOKUP-based scripts. For repeated comparisons of similar files, create reusable formulas or VBA macros. Investment: time to create. Payback: faster ongoing comparisons.
Python with pandas. For very advanced or repeated comparisons. Read both Excel files into DataFrames. Use pandas merge or compare functions. Generate detailed reports. Programming knowledge required.
R for data comparison. Similar to Python โ for analysts comfortable with R, the dplyr package provides robust comparison capabilities.
Power Query. Excel's built-in data transformation tool. Can be used for sophisticated comparisons. Load both files as queries, merge with comparison logic, output comparison results. Built into Excel โ no third-party needed.
Choosing third-party tools. For occasional use: Excel's built-in methods are usually sufficient. For frequent use: Power Query or VBA-based solutions in Excel. For sensitive data: avoid uploading to online services. For non-technical users: Beyond Compare's GUI is approachable. For technical users: Python/pandas provides maximum flexibility.
Most analysts find that Excel's built-in methods handle 80%+ of comparison needs. Third-party tools are for the remaining 20% โ complex scenarios, repeated workflows, or specific feature needs.
Tips for effective sheet comparison. Best practices across all methods.
Practice 1: Ensure same structure first. Before comparing, verify both sheets have the same column structure (same columns in same order). If not, reorganize first or use VLOOKUP-based comparison that handles different positions.
Practice 2: Sort consistently. If using View Side by Side or Conditional Formatting, both sheets should be sorted the same way. Otherwise differences appear where data is just in different order.
Practice 3: Document expected differences. Some differences are expected (e.g., date column will always differ). Document these so you can ignore them.
Practice 4: Use named ranges. For repeated comparisons, define named ranges for the data areas. Formulas reference names rather than specific cells, easier to maintain.
Practice 5: Save comparison results. Don't just visually scan โ capture results in a comparison report. Useful for audit trail and future reference.
Practice 6: Test with sample data first. For complex comparisons (multi-column matching, etc.), test on a small subset first to verify logic. Then apply to full datasets.
Practice 7: Use Power Query for repeated tasks. If you're comparing the same types of files repeatedly, build a Power Query that automates the comparison. Saves substantial time over manual repeats.
Practice 8: Consider data types. Numbers compared as text may not match. Dates with different formats may not match. Verify data types are consistent before comparison.
Practice 9: Trim whitespace. Leading/trailing whitespace can cause cells to appear different that are 'logically' the same. Use TRIM function: =TRIM(A2) before comparison.
Practice 10: Document the comparison. For audit purposes, document: what was compared, when, with what methodology, results, conclusions. Useful months later when reviewing.
Use View Side by Side. Quick visual comparison.
Use Conditional Formatting with =A2<>Sheet2!A2 formula.
Use VLOOKUP/XLOOKUP formulas for systematic comparison.
Formula-based or Power Query. Better than visual comparison.
Use Microsoft Spreadsheet Compare tool (Excel 2019+).
Build Power Query or VBA macro. Pays off over many uses.
Use built-in Excel methods. Avoid uploading to third-party online services.
Common comparison scenarios and recommended methods.
Scenario 1: Comparing two versions of a price list. Method: VLOOKUP-based comparison. Add column showing if each item still exists, retrieved price from new list, and 'Match/Different' status. Identifies removed items, added items, price changes.
Scenario 2: Auditing changes to a budget spreadsheet. Method: Microsoft Spreadsheet Compare tool. Shows all changes including: cell values, formulas, formatting changes. Generates audit report.
Scenario 3: Reconciling two customer databases. Method: VLOOKUP for matching, then IF comparison for differences. Multi-column match (name, email, ID) for accurate matching. Output shows: existing customers, new customers, changed customers.
Scenario 4: Verifying data import. Imported data into Excel; want to compare with the source. Method: View Side by Side for small datasets; Conditional Formatting for medium; VLOOKUP for large or with reorganization.
Scenario 5: Quarterly comparison of sales data. Method: For recurring comparison, build Power Query that loads both quarters and outputs comparison. Re-run each quarter; takes seconds vs hours of manual work.
Scenario 6: Verifying two reports match. Method: Conditional Formatting if same structure. Use COUNTIF to identify mismatches if rows are in different order.
Scenario 7: Comparing a template against a customized version. Method: Microsoft Spreadsheet Compare to identify all changes from the template. Useful for compliance/standards review.
Scenario 8: Auditing user changes to a shared workbook. Method: Excel's track changes (older versions) or version history (newer Excel) provides automatic change tracking. If unavailable, Microsoft Spreadsheet Compare with before/after versions.
For each scenario, the right method depends on: data size, structure consistency, frequency of comparison, need for audit trail. Most scenarios can be handled with VLOOKUP-based comparison plus Conditional Formatting.
Comparing two Excel sheets is a fundamental data skill. Excel provides multiple methods โ from simple visual comparison to comprehensive auditing โ covering all common comparison needs. For most users, the right approach depends on three factors: data size, structure consistency, and need for audit trail.
For most practical needs: View Side by Side for quick visual checks, Conditional Formatting for medium-sized comparisons with same structure, VLOOKUP/XLOOKUP formulas for large or different-order data with audit trail. Microsoft Spreadsheet Compare for the rare case where you need to audit formulas, formatting, and VBA code in addition to data. Master these techniques and you can handle virtually any Excel sheet comparison need.