How to Use SUMIF with OR in Google Sheets

The SUMIF with OR function in Google Sheets allows you to add up cells based on multiple criteria. This can be used to add up values in a range if they meet any one of the criteria that you specify. The criteria can be specified in the form of logical expressions and can be combined with the OR operator to specify multiple criteria. The SUMIF with OR function can be used to quickly calculate the total amount that meets any one of the specified criteria.


Often you may want to sum the cells in Google Sheets that meet one of several criteria.

You can use the following basic syntax to do so:

=SUMIFS(B2:B11, A2:A11, "value1") + SUMIFS(B2:B11, A2:A11, "value2")

This particular formula takes the sum of values in the range B2:B11 where the corresponding value in the range A2:A11 is equal to “value1” or “value2.”

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

Example: Use SUMIF 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 “Mavs” or “Jazz”:

=SUMIFS(B2:B11, A2:A11, "Mavs") + SUMIFS(B2:B11, A2:A11, "Jazz")

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

SUMIF OR formula in Google Sheets

We can see that the sum of values in the Points column where the corresponding value in the Team column is “Mavs” or “Jazz” is 77.

We can manually verify that this is correct by taking the sum of points for the Mavs and Jazz:

Sum of Points: 23 + 13 + 19 + 22 = 77.

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

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

x