New Tool Radar

AI for Data & Spreadsheets

How to Check an AI-Written UNIQUE List Against the Source for Duplicates

Check an AI-written UNIQUE list against the source to confirm duplicates were removed, not hidden by formatting.

Schematic with three steps: Count the distinct values in the source; Compare the UNIQUE result with the hand; Clean the source and re-check.

UNIQUE returns each distinct value once, but two values that look identical can still be distinct to UNIQUE when one has a trailing space, a different case, or a number stored as text. An AI-written UNIQUE list can then show what looks like a duplicate, or hide a real one behind formatting. Compare the list with the source, row by row, before trusting it.

What you need

  • The AI-written UNIQUE formula and its result
  • The source list, with its duplicates known
  • A count of the distinct values, worked out by hand

Step 1: Count the distinct values in the source by hand

Sort a copy of the source list and count the distinct values by hand, looking closely for near-identical entries. Write the hand count down.

Step 2: Compare the UNIQUE result with the hand count

Count the rows the UNIQUE formula returns and compare with the hand count. If UNIQUE returns more rows, look for trailing spaces or case differences in the extras.

Step 3: Clean the source and re-check

Trim trailing spaces and standardise case in the source, then re-run the UNIQUE formula. The new count must match the hand count exactly.

Worked example: synthetic region list with a trailing space

The table below is a synthetic example. It shows the expected result of checking an AI-written UNIQUE list; no formula was run.

Check Value Result
Distinct regions by hand 4 North, South, East, West
UNIQUE rows returned 5 One extra East
Cause found “East ” with a space Trailing space in the source
UNIQUE after trimming 4 Matches the hand count

Expected result (UNTESTED). UNIQUE returns five rows against a hand count of four, because one source cell holds “East ” with a trailing space; trimming the source brings UNIQUE back to four rows. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • UNIQUE is case-insensitive, so East and EAST count as one value, while a trailing space still splits them.
  • UNIQUE needs Microsoft 365 or Excel 2021 or later; older versions show #NAME?.
  • A blank cell in the source appears once in the UNIQUE list as an empty row.
  • UNIQUE spills its results, so a blocked cell in the spill range stops it with #SPILL!.

Sources

See all