Highlight Only the Unique Values

Excel Formulas › Conditional Formatting

All versionsCOUNTIF

The opposite of flagging duplicates: highlight the values that appear exactly once. A COUNTIF = 1 rule surfaces the one-offs — useful for finding singletons in a list.


Quick formula: select the range, add a formula rule:
=COUNTIF($A$2:$A$20, A2) = 1
COUNTIF counts each value; = 1 means it occurs once — a unique (non-repeated) value.

Functions used (tap for the full reference guide):

The example

Values appearing only once are flagged.

AB
1ValueCount
2A-1002
3A-1031

The formula

Flag the one-offs:

=COUNTIF($A$2:$A$20, A2) = 1 // appears exactly once

How it works

COUNTIF distinguishes singletons from repeats:

  1. COUNTIF(range, value) counts occurrences of the current value.
  2. = 1 is TRUE only for values that appear once — the uniques.
  3. Lock the range absolutely; keep the test cell relative.
  4. Built-in shortcut: Highlight Cells Rules → Duplicate Values has a “Unique” option in its dropdown.

Distinct vs unique: “unique” here means appears exactly once. If you want a distinct list (each value once, including repeated ones), that’s the UNIQUE function or the count-unique recipe — a different question.

Try it: interactive demo

Live demo

One-offs highlight.

Variations

Duplicates instead

Repeated values:

=COUNTIF($A$2:$A$20, A2) > 1

Built-in

Highlight Cells Rules → Duplicate Values → Unique.

Count the uniques

How many one-offs:

=SUMPRODUCT(--(COUNTIF(rng,rng)=1))

Pitfalls & errors

Lock the range. $A$2:$A$20 absolute; relative test cell.

Unique ≠ distinct. This flags values seen once; it doesn’t build a de-duplicated list.

Case & spaces. COUNTIF ignores case; trailing spaces split a value into two.

Practice workbook

📊
Download the free Highlight Only the Unique Values practice workbook
A unique-only CF rule with the duplicates and count variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I highlight only unique values in Excel?
Add a formula CF rule =COUNTIF($range, A2) = 1, which is TRUE for values that appear exactly once.
What's the difference between unique and distinct?
Unique here means appears once; distinct means each value listed once (including ones that repeat). For a distinct list use the UNIQUE function.
Is there a built-in option?
Yes — Highlight Cells Rules → Duplicate Values has a Unique option in its dropdown.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Highlight duplicates · Count unique values · Unique with count

Function references: COUNTIF