How To: Find and Remove Duplicates
Duplicate records inflate totals and spoil counts. The safe routine:
- Find them:
=COUNTIF($A$2:$A$9,A2)>1flags repeats. - Check that they really are duplicates, not two people with the same name.
- Remove: Data > Remove Duplicates on a copy of the data, or build a clean list with
UNIQUE.
Counting how many are extra, rows - distinct values, tells you how big the problem is.
Exampleexcel
Quick check
Why copy the data before using Remove Duplicates?
Your turn: write the code
Mark each row in B2:B5 with =COUNTIF(A2:A5,A2) so repeated names show a number above 1.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.