Function Problems

How to Compare Two Excel Tables and Find Key or Value Differences

Emma BrownEmma Brown Nov 10, 2026 869 views

Question details

The user needs to compare two Excel tables containing keys and values to quickly identify missing keys or mismatched values between them.

How to Compare Two Excel Tables and Find Differences
Product
Excel
Device & OS
not provided
Scenario
Comparing two related datasets to audit records, finding discrepancies such as differing values for the same key, or identifying keys that exist in only one of the tables.
Observed behavior
Extracting the exact rows where keys are missing or values differ into a consolidated list, avoiding manual line-by-line comparison.
Before you start

Ensure both tables have standardized column headers (e.g., 'name' and 'value') and format your data as official Excel Tables (Ctrl+T) so you can use dynamic structured references in your formulas.

Solution 1Recommended

Use Dynamic Array Formulas (LET, FILTER, VSTACK)

Combine modern Excel functions to dynamically extract mismatched values and missing rows without macros.

This approach uses the LET function to define variables for two separate checks: mismatched rows in Table 1 and missing keys in Table 2. It then stacks them together seamlessly using VSTACK.

1
Select the output cell

Click on an empty cell where you want the list of differences to appear. Ensure there is enough empty space below and to the right for the data to spill.

2
Enter the comparison formula

Type the following formula: =LET(p1,FILTER(Table1,BYROW(Table1[name],LAMBDA(x,XLOOKUP(x,Table2[name],Table2[value],"")))<>Table1[value],""),p2,IFERROR(FILTER(Table2,ISERROR(XMATCH(Table2[name],Table1[name]))),""),VSTACK(p1,p2))

3
Review the dynamic results

Press Enter. The first part of the result will return rows from Table1 whose values differ from Table2. The second part will return keys found exclusively in Table2.

Use Dynamic Array Formulas (LET, FILTER, VSTACK)
Compatibility Note: This solution requires a spreadsheet software that supports modern dynamic arrays, such as Microsoft 365 or WPS Office.
Efficient Data Comparison

Compare Tables Easily with WPS Spreadsheet

WPS Spreadsheet fully supports advanced dynamic array functions like XLOOKUP, FILTER, and VSTACK, making it incredibly easy to compare complex datasets without switching tools.

  1. 1. Open your datasets in WPS: Launch WPS Spreadsheet and open the workbook containing the two tables you want to compare.
  2. 2. Format as Tables: Select each data range and press Ctrl+T to format them as official tables, naming them 'Table1' and 'Table2'.
  3. 3. Apply the comparison formula: In an empty cell, paste the LET and VSTACK formula to instantly spill the differences onto your sheet.
100% compatible with Microsoft Excel formulasSupports modern dynamic arrays and XLOOKUPFree and lightweight office suiteClean, tabbed user interface for managing multiple workbooks
microsoft office alternative - wps office

Frequently Asked Questions

Why does my dynamic array formula return a #NAME? error?

A #NAME? error typically occurs if your spreadsheet software does not support modern functions like LET, VSTACK, or XLOOKUP. You will need to upgrade to Microsoft 365 or use a modern alternative like WPS Office.

Can I use conditional formatting instead of a formula to highlight differences?

Yes. You can select both columns of values, navigate to the Home tab, click Conditional Formatting > Highlight Cells Rules > Duplicate Values, and change the dropdown from 'Duplicate' to 'Unique' to visually highlight non-matching data.

How do I compare tables if I have multiple columns instead of just key and value?

If you are using Power Query, you can select all relevant columns when configuring the Merge/Join. If using formulas, you can concatenate the values of multiple columns to create a single unique identifier string for comparison.