Excel: Compare Two Lists and Return Differences with VLOOKUP
Learn how to compare two Excel lists and return differences using VLOOKUP. Step-by-step formulas, matching options, and checks for reliable results.
What the answer is
VLOOKUP can identify which values appear in one list but not the other, but it does not return a complete set difference by itself. The practical method is to use VLOOKUP with an exact-match lookup and the IFERROR function beside each list, then mark rows that are not found in the other list. The choice of exact matching, normalization, and duplicate handling changes which rows are reported as different.
What the result tells you
The formulas below answer two related questions: which items in List A are missing from List B, and which items in List B are missing from List A. A match means the value exists at least once in the lookup range. A non-match means VLOOKUP could not find that exact value.
How VLOOKUP matching affects the result
VLOOKUP with FALSE as the final argument performs an exact match. Text is case-insensitive in this context, so "Apple" and "apple" are treated as the same value unless you use a different comparison method. Numeric values stored as text will not match identical-looking numbers stored as numbers, which is a common cause of false differences.
Duplicate values require an explicit decision. The following method shows whether each row's value exists anywhere in the other list. It does not match duplicates one-for-one. If List A contains "Red" twice and List B contains "Red" once, both copies in List A are reported as found. If you need to compare quantity of occurrences, use COUNTIF rather than a simple VLOOKUP lookup.
How to set up the comparison
The following is a hypothetical example. Put the first list in column A, starting at A2, and the second list in column C, starting at C2. Insert a helper column after each list for the lookup result.
Step 1: Mark values in List A that are missing from List B
=IFERROR(VLOOKUP(A2,$C$2:$C$100,1,FALSE),"Not in List B")
Place this in B2 and copy it down. Adjust the range $C$2:$C$100 to cover your complete List B. When VLOOKUP finds the value, the cell shows that value. When it does not, IFERROR shows "Not in List B".
Step 2: Mark values in List B that are missing from List A
=IFERROR(VLOOKUP(C2,$A$2:$A$100,1,FALSE),"Not in List A")
Place this in D2 and copy it down. This performs the comparison in the opposite direction.
Step 3: Check the output
Verify that every row in each helper column shows either the matching value or the expected missing-label. Check a few known matches and known non-matches by copying test values between the lists or using a temporary small sample. If empty cells or extra spaces make values look different, trim or clean both lists with TRIM or the Text to Columns operation before comparing.
When to choose a different method
Use this VLOOKUP method for quick checks of values that exist in one list but not the other. Use COUNTIF when duplicates must be compared by quantity. Use INDEX/MATCH or Exact when you need finer control over matching but can tolerate a longer formula. Conditional formatting can highlight differences visually, though it does not produce a reusable difference column.
Limitations to check
- VLOOKUP searches the first column of the specified range only, so structure the ranges as shown.
- The formula identifies membership, not which value should replace another.
- Large ranges and many helper formulas can slow recalculation, but a standard desktop Excel file with two moderate lists typically recalculates quickly; perform a targeted test if performance matters.
- The exact-match setting is required. Omitting FALSE allows approximate matching and can produce misleading results for unsorted text or numeric lists.