How to Highlight Duplicate Names on the Same Date in Excel
Question details
The user needs to highlight entries where both the caller's name and the date are identical to a previous entry, effectively identifying repeated instances based on two distinct conditions.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing logs, call lists, or daily attendance where a person should ideally be recorded only once per day, requiring a visual flag for any subsequent duplicate records.
- Observed behavior
- The goal state is to have the spreadsheet automatically apply a background color to the second and all subsequent occurrences of the same name logged under the same date.
Ensure your data is organized into clean columns without merged cells. Take note of the specific column letters for your dates and names, and verify that your dates are formatted as actual date values rather than plain text.
Use COUNTIFS to Highlight Second and Subsequent Duplicates
Apply a conditional formatting formula using COUNTIFS with mixed cell references to flag only the repeated occurrences while leaving the first entry unformatted.
This method utilizes mixed cell references in the formula. By locking the starting row (e.g., $A$2) but leaving the ending row relative (e.g., $A2), the formula's range dynamically expands as it moves down the column. This allows Excel to count how many times a specific combination has appeared up to the current row, highlighting it only if the count is greater than 1.
Highlight the cells in the Name column where you want the formatting to appear (for example, B2:B100).
Navigate to the Home tab on the ribbon, click on 'Conditional Formatting', and select 'New Rule'.
Click on 'Use a formula to determine which cells to format' from the list of rule types.
In the formula bar, enter =COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2)>1. Adjust column A (dates) and column B (names) to match your actual worksheet columns.
Click the 'Format' button, go to the 'Fill' tab, select a highlight color (like yellow or light red), and click 'OK' twice to apply the rule.

Highlight Every Duplicate Record (Including the First Instance)
Modify the COUNTIFS formula's absolute references to highlight all matching name and date combinations in the dataset, not just the subsequent ones.
Highlight Multi-Condition Duplicates Easily with WPS Spreadsheet
WPS Spreadsheet fully supports advanced conditional formatting and COUNTIFS functions, allowing you to highlight complex duplicates seamlessly just as you would in Microsoft Excel.
- 1. Open your data file: Launch WPS Spreadsheet and open the document containing your dates and names.
- 2. Select the target column: Highlight the column or cells where you want the duplicate flags to appear.
- 3. Access Conditional Formatting: Click on 'Conditional Formatting' under the Home tab and select 'New Rule'.
- 4. Apply the COUNTIFS formula: Choose 'Use a formula to format cells', input =COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2)>1, set your color format, and click OK.

Frequently Asked Questions
Why is my conditional formatting highlighting the wrong rows entirely?
This usually happens when the active cell you started selecting from does not align with the relative row references in your formula. If you selected the range B2:B100, your formula must refer to row 2 (e.g., $A2 and $B2). If it refers to row 1, the highlights will be offset by one row.
Can I highlight the entire row instead of just the caller's name?
Yes. Instead of selecting just the name column, select your entire data range (e.g., A2:C100). Use the exact same formula: =COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2)>1. Because the column references ($A and $B) are locked, the formatting will automatically apply across the entire row.
How do I remove the highlight duplicate rule later?
Navigate to the Home tab, click on Conditional Formatting, and select 'Manage Rules'. Choose 'This Worksheet' from the top dropdown, locate the COUNTIFS rule you created, click 'Delete Rule', and press OK.
Will this formula work if my dates also include time stamps?
If your cells contain both dates and specific time stamps (e.g., '10/12/2023 14:30'), the exact cell values will not match unless the times are identical. You will first need to extract just the date into a helper column using the =INT() function, and then base your COUNTIFS rule on that helper column.




