Highlight Duplicate Rows – Excel & Google Sheets

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on July 9, 2022

This tutorial will demonstrate how to highlight duplicate rows using Conditional Formatting in Excel and Google Sheets.


highlight duplicate rows master


Highlight Duplicate Rows – COUNTIFS Function

To highlight duplicate rows with Conditional Formatting, use the COUNTIFS Function within a Conditional Formatting rule.

When programmed properly, the COUNTIFS Function will count all rows that match the current row.

Note: If you simply want to highlight duplicate values (instead of rows), you can use Excel’s built-in Highlight Cells Rules > Duplicate Cell Values.

  1. Select the range you want to apply formatting to.
  2. In the Ribbon, select Home > Conditional Formatting > New Rule.


highlight duplicate rows menu


  1. Select Use a formula to determine which cells to format, and enter the COUNTIFS formula:

Note: Your formula will differ based on the number of columns to compare.


highlight duplicate rows formula


  1. Click on the Format button and select your desired formatting.


conditional formatting greater less than format


  1. Click OK to view the result.


highlight duplicate rows final


Highlight Duplicate Rows in Google Sheets

The process to highlight duplicate rows in Google Sheets is similar to the process in Excel.

  1. Highlight the cells you wish to format, and then click on Format > Conditional Formatting.


google sheets begin end with menu


  1. The Apply to Range section will already be filled in.


google sheets highlight duplicate rows range


  1. From the Format Rules section, select Custom Formula from the drop-down list and type in the formula:


google sheets highlight duplicate rows formula


  1. Select the fill style for the cells that meet the criteria.


google sheets conditional formatting date in cell format


  1. Click Done to apply the rule.


google sheets highlight duplicate rows final

AI Formula Generator

Try for Free

See all How-To Articles