How to use COUNTIF with OR in Google Sheets?

The COUNTIF function in Google Sheets can be used with the OR operator to count the number of cells in a range that meet multiple criteria. This can be done by entering multiple criteria separated by commas, and using the OR operator between the criteria. For example, the formula COUNTIF(A2:A10,”A”,A2:A10,”B”) will count the number of cells in A2:A10 that contain either “A” or “B”.


Often you may want to count the number of cells in a range in Google Sheets that meet one of several criteria.

You can use the following basic syntax to do so:

=ArrayFormula(SUM(COUNTIF(A:A,{"Value1", "Value2", "Value3"})))

This particular formula counts the number of cells in column A that are equal to “Value1”, “Value2”, or “Value3.”

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

Example: Use COUNTIF with OR 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 A that have a value of “East” or “South”:

=ArrayFormula(SUM(COUNTIF(A:A,{"East", "South"})))

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

We can see that a total of 5 cells have a value of “East” or “South” in column A. 

We can also use the following formula to count the number of cells in column C that have a value of 95, 99, or 103:

=ArrayFormula(SUM(COUNTIF(C:C,{95, 99, 103})))

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

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

x