How to Highlight Duplicate Rows Across Multiple Columns in Microsoft Excel

Auditing datasets for redundant entries is a standard task in spreadsheet data preparation. However, Microsoft Excel’s native Highlight Cells Rules > Duplicate Values feature operates strictly on individual cells in isolation. If a client’s first name appears multiple times across different records, Excel highlights those individual cells even if the surrounding surname, company, and email address represent entirely distinct individuals.

When you need to identify true duplicate records—where an entire combination of values across multiple columns matches another row—you must employ a custom conditional formatting formula powered by the COUNTIFS function. This evaluates multi-column combinations simultaneously and highlights full rows containing duplicate records.


Why Standard Duplicate Highlighting Fails on Tables

Consider a customer registry containing First Name (Column A), Last Name (Column B), and City (Column C):

Row First Name (A) Last Name (B) City (C) Duplicate Evaluation
2 Sarah Jenkins London Original Entry
3 Sarah Connors Manchester Unique individual (sharing only first name). Standard tool false-flags this.
4 Sarah Jenkins London Genuine duplicate row of Row 2.

Applying Excel’s basic duplicate rule highlights “Sarah” in all three rows, obscuring the fact that only rows 2 and 4 represent a true multi-field duplication.


How to Create the Multi-Column COUNTIFS Formatting Rule

To flag entire rows that match across multiple columns, configure a conditional formatting rule using absolute column references and relative row references.

  1. Open your worksheet in Microsoft Excel.
  2. Highlight your table data range excluding the header row (for example, select A2:C100). Ensure cell A2 is the active cell in your selection.
  3. On the Home tab of the Ribbon, click Conditional Formatting and select New Rule….
  4. In the New Formatting Rule dialogue box, select Use a formula to determine which cells to format.
  5. In the formula field (Format values where this formula is true), enter the following formula:
    =COUNTIFS($A$2:$A$100, $A2, $B$2:$B$100, $B2, $C$2:$C$100, $C2)>1
  6. Click the Format… button.
  7. In the Format Cells window, switch to the Fill tab and select a soft highlight colour (such as light amber or soft red).
  8. Click OK, then click OK again to apply the rule.

Excel immediately scans your table and shades every row where the combination of First Name, Last Name, and City occurs more than once.


Understanding the Formula Syntax and Dollar Signs ($)

The placement of dollar signs in the COUNTIFS formula is critical to make the highlight span across the entire row:

  • Lookup Ranges ($A$2:$A$100): Both row and column coordinates are locked with dollar signs (absolute references). This ensures Excel compares every cell against the exact same static table boundaries.
  • Comparison Cells ($A2, $B2, $C2): The column letter has a dollar sign ($A), but the row number is relative (2). As Excel evaluates cells across Columns A, B, and C on Row 2, it always references $A2, $B2, and $C2, causing all columns in that row to format uniformly. When it moves down to Row 3, the relative reference updates dynamically to $A3, $B3, and $C3.
  • Comparison Condition (>1): If the total count of matching rows across all specified criteria exceeds 1, the condition evaluates to TRUE, triggering the highlight.

Auditing and Removing Identified Duplicate Rows

Once your duplicate rows are highlighted, you can filter and manage them cleanly:

  1. Click any cell inside your table headers and press Ctrl + Shift + L to activate Filter drop-down arrows.
  2. Click the filter arrow on any highlighted column.
  3. Hover over Filter by Color and select your conditional fill colour.
  4. Excel isolates the duplicate rows, allowing you to inspect them side by side.

If you subsequently need to remove the highlights, remember that you can clear conditional formatting in Excel easily without altering your underlying data.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.