FormulaCraft

How to compare two lists for differences in Excel and Google Sheets

Topic:Duplicates & uniqueness
Excel & Google Sheets
=IF(COUNTIF($B$2:$B$6,A2)=0,"Not in List B","Matched")

Verified example

Computed by a real spreadsheet engine on the sample data below.

List AList BStatus A
AppleApple
BananaCherry
CherryMango
DateBanana
ElderberryFig

=IF(COUNTIF($B$2:$B$6,A2)=0,"Not in List B","Matched")Matched

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In a helper column beside List A (e.g., C2) enter =IF(COUNTIF($B$2:$B$6,A2)=0,"Not in List B","Matched").
  2. 2Copy the formula down all rows in List A to check every item.
  3. 3Repeat with a second helper column beside List B to find values in B that are missing from A: =IF(COUNTIF($A$2:$A$6,B2)=0,"Not in List A","Matched").

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Is the comparison case-sensitive?

No — COUNTIF is case-insensitive. Use EXACT inside a SUMPRODUCT if case sensitivity matters: =IF(SUMPRODUCT(--(EXACT($B$2:$B$6,A2)))=0,"Not Found","Matched").

How do I compare lists of different lengths?

Expand the COUNTIF range to the full length of the longer list, or use a named range for each list — the formula still works correctly.

More on Duplicates & uniqueness

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: