FormulaCraft

How to highlight values not in another list in Excel and Google Sheets

Topic:Conditional formatting
Excel & Google Sheets
=COUNTIF($C$2:$C$6,A2)=0

Verified example

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

InvoiceRef List
INV-001INV-001
INV-002INV-003
INV-003INV-005
INV-007

=COUNTIF($C$2:$C$6,A2)=0TRUE

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. 1Put your primary list in column A and your reference list in column C.
  2. 2Select the range in column A to check, e.g. A2:A20.
  3. 3Open Conditional Formatting, choose 'Use a formula', and enter =COUNTIF($C$2:$C$100,A2)=0. A count of 0 means the value is absent from the reference list. Set a highlight color and save.

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

What if I want to highlight values that ARE in the other list instead?

Change =0 to >0: =COUNTIF($C$2:$C$100,A2)>0 will highlight only the values that do appear in the reference list.

More on Conditional formatting

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: