Table of Contents
Highlight duplicates with a conditional formatting rule that counts how often a value appears. For a list in column A with a header in row 1, apply the rule to A2:A and use =AND(A2<>"",COUNTIF($A$2:$A,A2)>1). This colors every occurrence of a repeated value and ignores blanks.
Set up the duplicate rule
- Select
A2:A, leaving the header outside the range.
- Choose Format > Conditional formatting and verify Apply to range.


- Under Format cells if, choose Custom formula is and paste the formula above. The older screenshot uses a formula that includes the header and does not exclude blanks.


- Choose a fill color and click Done. Two cells containing the same entry should both change color.


Highlight only the extra copies
To leave the first occurrence uncolored, use =AND(A2<>"",COUNTIF($A$2:A2,A2)>1). The count starts at row 2 and ends at the current row, so the second and later occurrences are highlighted.
Fix a rule that highlights the wrong rows
Make the formula’s relative row match the first row of your selected range. For example, if the range starts at B3, adjust both the starting row and the column in the formula. For a large sheet, use a bounded range such as A2:A1000 if the whole-column rule slows it down. If your locale uses semicolons in formulas, replace the argument commas accordingly.
COUNTIF treats uppercase and lowercase letters as the same. Review the highlighted rows before deleting anything. See Google’s conditional formatting guide for more examples.
Reader Comments 0
Sign in with email or Google to join the discussion.