Table of Contents
The ability to quickly identify and highlight duplicate values in two separate columns in Microsoft Excel is a fundamental skill for effective data management. This technique is incredibly helpful in a variety of professional and organizational scenarios. Whether you are cleaning up a massive mailing list to ensure no recipient receives double communications, or scrutinizing complex financial logs to detect redundant entries, the capability to easily highlight duplicates is crucial. This process not only saves significant time but also provides immediate, actionable insights, drastically improving the integrity and reliability of your datasets. In this comprehensive guide, we will dissect the various robust methods available in Excel to pinpoint and visually emphasize duplicate entries across two distinct columns.
When dealing with large datasets, visual aids are essential. Conditional Formatting offers a powerful, low-effort solution to spot these redundancies instantly, allowing users to focus their efforts on data cleaning and analysis rather than manual comparison.
The Power of Conditional Formatting for Data Analysis
The primary tool we leverage for this task is Excel’s Conditional Formatting feature. This functionality allows users to automatically apply specific formatting—such as colors, fonts, or borders—to cells that meet predefined criteria. When applied across two separate but related columns, it provides an immediate visual map of shared entries, which is paramount for thorough data analysis.
In many business and academic contexts, identifying shared entries between two lists is a critical operation. For instance, comparing inventory lists from two different warehouses or cross-referencing customer IDs in a primary database against a suppression list. Fortunately, Excel provides a highly intuitive and efficient route to accomplishing this goal using the dedicated Highlight Cells Rules feature, which streamlines the comparison process significantly.
The method is designed to be user-friendly, requiring only a few clicks to implement. By selecting the combined range of data and choosing the appropriate rule, Excel automatically scans the entirety of the selection and applies the designated style to any cell value that appears more than once within that aggregated range. This ensures that any item appearing in Column A and Column B will be flagged, regardless of the relative position of the entries.

Prerequisites and Data Preparation for Duplicate Identification
Before initiating the formatting process, ensuring your data is clean and correctly structured is paramount. While conditional formatting is robust, it relies on exact textual matches. Therefore, minor discrepancies, such as extra spaces, inconsistent use of capitalization (though the built-in rule is generally case-insensitive), or the presence of leading/trailing hidden characters, can prevent Excel from recognizing a true duplicate.
It is recommended that both columns intended for comparison are properly labeled and contain uniform data types. For example, if comparing names, ensure all names are entered consistently. If comparing numerical identifiers, ensure all entries are formatted as numbers and not a mixture of text and numbers. Although the built-in duplicate rule is straightforward, thorough preparation minimizes false negatives and ensures accurate results across both lists.
The key to highlighting duplicates across multiple columns is treating the entire comparison area as a single, contiguous range. If your two columns are A and B, and your data runs from row 2 to row 100 in both, your selection range must be A2:B100. This consolidated selection is what allows the conditional formatting rule to treat all entries as belonging to one large list for the purpose of duplication testing.
Step-by-Step Guide: Highlighting Duplicates Using Built-in Rules
This method utilizes Excel’s dedicated tool for locating repeated entries, making it the fastest route for most users. The process is straightforward, focusing on the visual identification of shared items within the combined cell range. We will walk through the precise steps required to activate and apply this feature effectively, using the standard Excel ribbon interface.
Select the Comparison Range: Start by selecting the entire range that spans both columns you wish to compare. If your data is in columns A and B, highlight the entire block, for example, A2:B13. It is essential that the selection includes data from both columns simultaneously.
Navigate to Conditional Formatting: On the Microsoft Excel ribbon, click the Home tab. Locate the Styles group and click the Conditional Formatting icon.
Access the Duplication Rule: From the dropdown menu that appears, hover over Highlight Cells Rules. A secondary menu will cascade; near the bottom, select Duplicate Values… from the dropdown menu.
Once you click Duplicate Values…, Excel will immediately launch a dialog box, giving you control over the visual output of the duplication check. This powerful feature simplifies complex data validation tasks into a quick, repeatable process. This approach is highly effective for basic comparisons where you simply need to flag any value that exists in both Column A and Column B.

Understanding the Conditional Formatting ‘Duplicate Values’ Dialog
When the Duplicate Values dialog box appears, you are presented with two primary choices: whether to highlight Duplicate or Unique values, and what format to apply. For the purpose of finding overlaps between two lists, ensure the left dropdown is set to Duplicate. This instructs Excel to only format cells whose contents appear more than once within the previously selected range.
The right dropdown menu controls the applied style. Excel offers several default formatting options, such as Light Red Fill with Dark Red Text or Green Fill with Dark Green Text. These pre-set styles are often sufficient for immediate visual identification. However, for users requiring specific visual schemas, there is also the option to select Custom Format…, which opens the standard Format Cells dialog, allowing complete customization of number formats, font styles, borders, and fills.
We will use the default option of Light Red Fill with Dark Red Text as it provides excellent visual contrast against standard white backgrounds. After selecting your desired format, click OK. The formatting is instantly applied, and any entry that is duplicated across the two comparison columns will immediately change color, providing an immediate snapshot of the overlapping data.

Advanced Technique: Highlighting Duplicates Using the COUNTIF Function
While the built-in rule is excellent for simple cross-column checks, using a custom formula based on the COUNTIF function offers far greater flexibility. This technique is necessary when you need specific conditional highlighting, such as highlighting entries in Column B only if they exist in Column A, without marking duplicates that exist only within Column A itself.
The COUNTIF function counts the number of cells within a specified range that meet a given criterion. By embedding this function into a Conditional Formatting rule, we can tell Excel to format a cell if the count of that cell’s value within the other column’s range is greater than zero. This provides precise control over the comparison logic, a level of granularity the basic Duplicate Values rule does not offer.
To implement this, you would select the “Use a formula to determine which cells to format” option within the Conditional Formatting rules manager. If Column A (A2:A13) is your primary list and Column B (B2:B13) is your secondary list, and you want to highlight values in B that appear in A, you would select range B2:B13 and use the formula: =COUNTIF($A$2:$A$13, B2)>0. The use of absolute references ($) for the criterion range is essential, while the cell reference (B2) must be relative so it adjusts as the rule is applied down the column.
Practical Example: Identifying Team Overlaps
Let us consider a concrete scenario. Suppose we manage two lists of basketball players, one for the “Bulls” (Column A) and one for the “Raptors” (Column B). We want to quickly identify which players are registered on both teams, indicating a data duplication or a shared resource that needs immediate attention. Our dataset spans rows 2 through 13.
The goal is to highlight any player name that appears in the combined range A2:B13 more than once. This means if a player is listed in both the Bulls and Raptors columns, both instances of their name will be highlighted. This visual output makes cross-referencing and data auditing extremely efficient.
Suppose we have the following lists of basketball players on two different teams:

Following the steps outlined in Section 3, we select the range A2:B13 and apply the Duplicate Values rule, choosing the red fill format. Upon clicking OK, the results are instantaneously displayed, demonstrating a clear overlap between the two team rosters.
Once we click OK, all duplicate values that occur in both team lists will be highlighted:

Based on the visual output, we can easily see that the following names occur in both lists:
- Andy
- Chad
- Frank
- Henry
- John
Addressing Limitations and Nuances
While the Conditional Formatting tool is highly effective, users must be aware of certain operational nuances. Firstly, the built-in Duplicate Values rule is generally case-insensitive. This means “JOHN” and “John” will be treated as the same entry and flagged as a duplicate. If your data requires case-sensitive duplication checks (e.g., distinguishing between different product codes that vary only by case), you must use a custom formula involving functions like EXACT, which is significantly more complex than the basic method.
Secondly, handling blank cells is crucial. If the selected range contains empty cells, Excel typically ignores them in this context. However, if using the custom COUNTIF function, you should explicitly include a check to exclude blank cells (e.g., AND(B2" ", COUNTIF(...)>0)) to prevent accidental highlighting if blanks exist in both ranges and are mistakenly counted as duplicates.
Finally, remember the scope of the rule. The built-in rule checks for duplication across the entire selected area. If you selected A2:B13, it will flag duplicates occurring within Column A (intra-column duplicates) and duplicates occurring between A and B (inter-column duplicates). If your sole purpose is to find overlaps between the two columns and ignore intra-column duplicates, the custom formula technique (Section 5) is the superior choice, offering targeted precision.
Note: In this example, each range that we used had the same number of cells (A2:A13 and B2:B13). However, the conditional formatting rule is flexible and will function perfectly with ranges that do not have equal sizes, such as comparing A2:A50 against B2:B10. The only requirement is that the combined selection range is contiguous and covers all data points intended for comparison.
Mastering these Microsoft Excel conditional formatting techniques significantly enhances your ability to perform efficient data audits and maintain high-quality datasets. Whether using the simple built-in rule or a custom formula, the immediate visual insight gained is invaluable for any serious data professional involved in rigorous data management.
Cite this article
stats writer (2025). How do you highlight duplicates in two columns in excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-you-highlight-duplicates-in-two-columns-in-excel/
stats writer. "How do you highlight duplicates in two columns in excel?." PSYCHOLOGICAL SCALES, 18 Nov. 2025, https://scales.arabpsychology.com/stats/how-do-you-highlight-duplicates-in-two-columns-in-excel/.
stats writer. "How do you highlight duplicates in two columns in excel?." PSYCHOLOGICAL SCALES, 2025. https://scales.arabpsychology.com/stats/how-do-you-highlight-duplicates-in-two-columns-in-excel/.
stats writer (2025) 'How do you highlight duplicates in two columns in excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-you-highlight-duplicates-in-two-columns-in-excel/.
[1] stats writer, "How do you highlight duplicates in two columns in excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, November, 2025.
stats writer. How do you highlight duplicates in two columns in excel?. PSYCHOLOGICAL SCALES. 2025;vol(issue):pages.
