How to highlight duplicate values
Tutor 5 (120 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To highlight duplicate values in Excel, use Conditional Formatting with the built-in Duplicate Values rule to automatically apply visual emphasis to repeated data entries.
Method 1: Using Conditional Formatting (Built-in Rule)
Windows
Select the cell range that contains the data.
Open the Home tab.
Choose Conditional Formatting.
Select Highlight Cells Rules.
Choose Duplicate Values.
Select a formatting style from the dropdown.
Select OK.
Mac
Select the cell range that contains the data.
Open the Home tab.
Choose Conditional Formatting.
Select Highlight Cells Rules.
Choose Duplicate Values.
Select a formatting style.
Select OK.
The steps and options are identical across both platforms.
Can Excel highlight duplicates across multiple columns?
Yes. Excel highlights duplicate values across multiple columns when the entire range is selected before applying Conditional Formatting.
The rule evaluates the selected range as a single dataset. A value repeated in any column within that range receives the selected formatting.
How to highlight duplicates without highlighting the first occurrence?
To highlight duplicates while excluding the first instance, use a formula-based Conditional Formatting rule.
Formula-based method
Select the target range.
Open Home → Conditional Formatting → New Rule.
Select Use a formula to determine which cells to format.
Enter the formula below, adjusting the range reference.
=COUNTIF($A$1:$A$100,A1)>1
Select Format and apply the desired style.
Select OK.
This rule highlights every repeated instance, including the first. Excluding the first occurrence requires ranking logic.
Exclude the first occurrence
=COUNTIF($A$1:A1,A1)>1
This formula counts appearances up to the current row, highlighting only the second and subsequent occurrences.
Does highlighting duplicates change the data?
No. Highlighting duplicates applies visual formatting only and does not modify, remove, or reorder the underlying data.
How to highlight duplicates in text and numbers at the same time?
Excel evaluates text and numeric values separately based on exact matches.
The built-in Duplicate Values rule detects:
Numbers with identical numeric values.
Text strings with identical characters and spacing.
Case sensitivity remains disabled by default. Uppercase and lowercase versions of the same word count as duplicates.
How to remove duplicate highlighting
To remove duplicate highlighting, clear the Conditional Formatting rule.
Steps
Select the formatted range.
Open Home → Conditional Formatting.
Select Clear Rules.
Choose Clear Rules from Selected Cells or Clear Rules from Entire Sheet.
Why are some duplicates not highlighted
Duplicates fail to highlight due to data inconsistencies.
Common causes:
Leading or trailing spaces.
Hidden characters imported from external files.
Numbers stored as text.
Mixed data types within the same column.
Data normalization using TRIM, CLEAN, and value conversion resolves this issue before applying the rule.
Can duplicate highlighting update automatically?
Yes. Conditional Formatting recalculates in real time when data changes, ensuring continuous accuracy without manual refresh.
Best practices for accurate duplicate detection
Apply formatting after finalizing the dataset structure.
Normalize text before rule creation.
Use formula-based rules for advanced control.
Restrict formatting ranges to active data zones to reduce recalculation overhead.
Does duplicate highlighting impact performance?
No. Performance impact remains negligible for small to medium datasets. Large datasets exceeding 100,000 rows require optimized ranges and formula-based conditions for efficient recalculation.
. Was this Helpful?Related Questions
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to freeze a row in excel
Answers · 1
How to freeze the top three rows in excel
Answers · 1
How to freeze the top two rows in excel
Answers · 1
How to freeze top row excel mac
Answers · 1