Google Sheets =COUNTIF Function

20/08/2024
Google Sheets =COUNTIF Functions Using Header

The =COUNTIF function is used in Google Sheets to detect duplicate data.

=COUNTIF Function to Find Multiple Criteria

Google Sheets =COUNTIF() Conditional Formatting

After opening the Conditional Formatting area, click on the “Add another rule” button.

When specifying the cell range, it is marked in a matrix format. In the example below, to select only rows 1 to 13 in column A, paste the following code:

A1:A13

In the format rule area, select the “Custom formula is” option from the list of choices, and paste the following code:

=COUNTIF(A:A,A1) > 1

Finally, in the “Formatting style” area, choose what action to take when duplicate values are found (background color, bold text, underlined text, strikethrough text, etc.), and save it by clicking the save button. In this example, duplicate values will be highlighted in green.

Google Sheets =COUNTIF Conditional Formatting

How Does =COUNTIF Function Work?

The function determines duplicate criteria as shown below.

How Does Countif Functions Work?

You can review a sample sheet that uses the =COUNTIF function by clicking the button below.

=COUNTIF