Excel & Google Sheets

VLOOKUP Comparing Two Columns: Find Matches & Differences Fast

Two lists. You need to know what's in both, what's only in one, and what's missing. VLOOKUP does this in seconds — once you know the right formula for each scenario.

⏱ 7 min read ✅ Excel & Google Sheets 📅 Updated May 2026
Excel spreadsheet with two data columns being compared using a VLOOKUP formula
Quick Answer

To compare two columns with VLOOKUP, use one column as the lookup value and the other as the search range. =IF(ISNA(VLOOKUP(A2, $C$2:$C$100, 1, FALSE)), "Missing", "Match") checks each value in column A against column C and labels it. Returns "Match" if found, "Missing" if not. Works in Excel and Google Sheets.

In this article
  1. How VLOOKUP comparison works
  2. Find matching values between two columns
  3. Find values missing from the second column
  4. Label every row as Match or Missing
  5. Return data from the matching row
  6. 6 ready-to-use comparison scenarios
  7. Better alternatives for some tasks
  8. FAQ

How VLOOKUP Column Comparison Works

When comparing two columns, you are not returning data from a separate table. You are checking whether a value exists in another column.

The trick: set the col_index_num to 1. This makes VLOOKUP return the matched value itself (column 1 of the range) — which you can then use with ISNA or IFERROR to determine whether the match was found.

Core comparison pattern
=VLOOKUP(A2, $C$2:$C$100, 1, FALSE) → Returns the value if A2 exists in C, or #N/A if not

You then wrap this with IF + ISNA (or IFERROR) to turn the #N/A into a readable label.

Find Matching Values Between Two Columns

You have List A in column A and List B in column C. You want to know which values from List A appear in List B.

In column B — shows the matched value or blank
=IFERROR(VLOOKUP(A2, $C$2:$C$100, 1, FALSE), "")

Result: column B shows the matched value where A2 exists in column C — blank where it doesn't. Filter column B to non-blank values to see only matches.

A — List AB — Formula ResultC — List B
AppleAppleBanana
MangoApple
BananaBananaGrape
CherryPeach

Find Values Missing From the Second Column

You want to know what's in column A that does NOT appear in column C. These are your gaps.

Returns "Missing" if A2 is not in column C
=IF(ISNA(VLOOKUP(A2, $C$2:$C$100, 1, FALSE)), "Missing", "")

Filter column B for "Missing" to see only the values from List A that don't appear in List B.

Then Extract the Missing Values

After flagging with the formula above, use Filter → Filter by value → "Missing" to see only the gaps. In Excel 365 or Google Sheets, use the FILTER function to extract them directly: =FILTER(A2:A100, ISNA(VLOOKUP(A2:A100, $C$2:$C$100, 1, FALSE)))

Label Every Row as Match or Missing

The cleanest version: every row in column B gets a clear label — no blanks, no #N/A errors.

Labels every row — no blanks, no errors
=IF(ISNA(VLOOKUP(A2, $C$2:$C$100, 1, FALSE)), "Not in List B", "Match")

Copy this formula down column B for every row in List A. Sort column B to group matches and non-matches together instantly.

Return Data From the Matching Row

Sometimes you don't just want to confirm a match — you want to pull a related value from the matched row. This is classic VLOOKUP territory.

List A is in column A (customer IDs). Column C has customer IDs, column D has their status. You want to pull the status into column B for each ID in List A:

Pull status from column D when ID in column C matches
=IFERROR(VLOOKUP(A2, $C$2:$D$100, 2, FALSE), "Not found")

Note the table_array is now $C$2:$D$100 (two columns) and col_index_num is 2 — returning column D (the status column).

6 Ready-to-Use Comparison Formulas

Does A exist in B? (Yes/No)

Clean boolean label for each row in List A.

=IF(ISNA(VLOOKUP(A2,$C:$C,1,FALSE)),"No","Yes")

Show matched value, blank if no match

Useful for filtering — blank rows are non-matches.

=IFERROR(VLOOKUP(A2,$C:$C,1,FALSE),"")

Extract only missing values (365/Sheets)

Dynamic array — spills all missing items at once.

=FILTER(A2:A100,ISNA(VLOOKUP(A2:A100,$C:$C,1,FALSE)))

Count how many from A are in B

Single number — how many matches exist.

=COUNTIF($C:$C,A2) — then SUM the column

Return value from matched row's column D

Match and pull related data in one formula.

=IFERROR(VLOOKUP(A2,$C:$D,2,FALSE),"—")

Cross-sheet comparison

Compare List A on Sheet1 against List B on Sheet2.

=IF(ISNA(VLOOKUP(A2,Sheet2!$A:$A,1,FALSE)),"Missing","Match")

When COUNTIF Beats VLOOKUP for Comparisons

For a pure match/no-match check, COUNTIF is simpler and faster than VLOOKUP:

COUNTIF — simpler than VLOOKUP for existence check
=IF(COUNTIF($C$2:$C$100, A2)>0, "Match", "No match")
Use CaseBest FormulaWhy
Does value exist in other column?COUNTIFSimpler, no #N/A handling needed
Return data from matched rowVLOOKUPCOUNTIF can't return related data
Count how many matches existCOUNTIFDirect count, one formula
Compare values in same row (A2 vs B2)IF(A2=B2,...)Direct equality — no lookup needed
Extract all non-matching rowsFILTER + ISNADynamic, updates automatically

Need to add conditions to your lookup?

Combining VLOOKUP with AND lets you match on multiple criteria at once — a common need in real data work.

VLOOKUP + AND Function →

Frequently Asked Questions

Use one column as the lookup value and the other as the search range with col_index_num set to 1. Example: =IF(ISNA(VLOOKUP(A2, $C$2:$C$100, 1, FALSE)), "Missing", "Match") checks each value in column A against column C and labels the result. Works in Excel and Google Sheets.
Use: =IF(ISNA(VLOOKUP(A2, $B$2:$B$100, 1, FALSE)), "Missing", ""). This returns "Missing" where A2 doesn't appear in column B, and blank where it does. Filter for "Missing" to see the gaps. In Excel 365 or Google Sheets, use FILTER to extract them: =FILTER(A2:A100, ISNA(VLOOKUP(A2:A100, $B:$B, 1, FALSE))).
Yes. Reference the other sheet in the range: =IF(ISNA(VLOOKUP(A2, Sheet2!$A$2:$A$100, 1, FALSE)), "Missing", "Match"). In Google Sheets, use single quotes: =IF(ISNA(VLOOKUP(A2, 'Sheet2'!$A$2:$A$100, 1, FALSE)), "Missing", "Match").
COUNTIF is simpler for a basic match/no-match check: =IF(COUNTIF($C$2:$C$100, A2)>0, "Match", "No match"). No #N/A handling needed. Use VLOOKUP when you also need to return data from the matched row — that's what it's best at. For same-row value comparison, a simple IF formula works: =IF(A2=B2, "Same", "Different").

Related Articles