How to Count Rows with Value in Google Sheets (3 Examples)

Google Sheets is a powerful spreadsheet application that allows you to count the number of rows with a specific value. This can be done using either the COUNTIF function, the COUNTIFS function, or the QUERY function. Each of these functions has their own unique parameters that can be used to count the number of rows with a given value. The examples provided in this article will help you to understand each of these functions and how to use them to count the rows with a given value in your Google Sheets.


You can use the following methods to count rows with a particular value in Google Sheets:

Method 1: Count Rows with Any Value

=COUNTIF(A1:A10, "<>")

Method 2: Count Rows with No Value

=COUNTBLANK(A1:A10)

Method 3: Count Rows with Specific Value

=COUNTBLANK(A1:A10, "50")

The following examples show how to use each method with the following dataset in Google Sheets:

Example 1: Count Rows with Any Value

We can use the following formula to count the number of rows with any value in column B:

=COUNTIF(B2:B11, "<>")

The following screenshot shows how to use this formula in practice:

We can see that there are 7 rows with any value in the Points column.

Example 2: Count Rows with No Value

We can use the following formula to count the number of rows with no value in column B:

=COUNTBLANK(B2:B11)

The following screenshot shows how to use this formula in practice:

We can see that there are 3 rows with no value in the Points column.

Example 3: Count Rows with Specific Value

We can use the following formula to count the number of rows with a value of “8” in column B:

=COUNTIF(B2:B11, "8")

The following screenshot shows how to use this formula in practice:

We can see that there are 3 rows with a value of “8” in the Points column.

The following tutorials explain how to perform other common operations in Google Sheets:

x