Removing duplicates with UNIQUE
Most customers ordered several times. Find the ones who ordered only once, who might need a follow-up.
keyboard Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Order | Customer | One-off customers | |||
| 2 | ORD-6187 | Jamal Novak | ||||
| 3 | ORD-2144 | Kofi Patel | ||||
| 4 | ORD-3381 | Quinn Evans | ||||
| 5 | ORD-1438 | Tariq Li | ||||
| 6 | ORD-6599 | Jamal Novak | ||||
| 7 | ORD-8791 | Jamal Novak | ||||
| 8 | ORD-3146 | Nadia Patel | ||||
| 9 | ORD-9904 | Kofi Patel | ||||
| 10 | ORD-7464 | Daniel Fischer | ||||
| 11 | ORD-4620 | Kofi Patel | ||||
| 12 | ORD-3721 | Isla Kowalski | ||||
| 13 | ORD-7094 | Isla Kowalski | ||||
| 14 | ||||||
| 15 | ||||||
| 16 | ||||||
| 17 |
How UNIQUE works
What does
UNIQUEdo?It returns a list with every repeat removed, in the order the values first appear. The result spills down, and it updates when the data changes:
=UNIQUE(B2:B13)What about capitals?
UNIQUEignores case: "acme" and "ACME" count as the same, and you get whichever appears first. Extra spaces do count, so clean withTRIMfirst if needed:=UNIQUE(TRIM(B2:B13)).What are the other parts?
=UNIQUE(array,[by_col], [exactly_once]) by_col:TRUEcompares columns instead of rows. Leave itFALSEfor a normal list.exactly_once:TRUEreturns only the values that appear once, such as customers who never came back.
Can it work on several columns?
Yes.
=UNIQUE(A2:B13)removes rows where both columns repeat: each distinct pair once.What goes well with it?
Wrap it in
SORTfor a sorted list,=SORT(UNIQUE(B2:B13)), or putCOUNTIFnext to it to count how often each value appears. The Table Workspace also has a Remove Duplicates step for whole files.
Know someone fighting with a spreadsheet? Send them this page.