How do you count cells between two values in Google Sheets?

In Google Sheets, there is a formula called COUNTIF that can be used to count cells between two values. The formula requires two arguments, the range of cells being counted and the criteria that defines the range of values being counted. The range of cells should include both the lower and upper values and the criteria argument should include the lower and upper values with the operator “>=” or “<=” depending on the desired range. This formula can be used to quickly and easily count cells between two values.


You can use the following basic syntax to count the number of cells between two values in Google Sheets:

=COUNTIFS(A:A,">10",A:A,"<15")

This particular formula counts the number of cells in column A that are greater than 10 or less than 15.

The following example shows how to use this syntax in practice.

Example: Count Cells Between Two Values in Google Sheets

Suppose we have the following data in Google Sheets:

We can use the following formula to count the number of cells in column B that have a value greater than 10 and less than 20:

=COUNTIFS(B:B,">10",B:B,"<20")

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

There are 4 points values that are greater than 10 and less than 20.

We can manually count each of these four values in column B:

Note that we can also use >= and <= in the formula to count the values between 10 and 20, inclusive:

=COUNTIFS(B:B,">=10",B:B,"<=20")

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

There are 6 points values that are greater than or equal to 10 and less than or equal to 20.

We can manually count each of these six values in column B:

Note: You can find the complete documentation for the COUNTIFS function in Google Sheets .

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

x