The SUMIF function in Google Sheets is used to sum across a range of cells based on a conditional test. The SUMIF function only adds values to the total when the condition is met.
Let’s see an example. Suppose we want to calculate the total order value for John only:
The SUMIF formula that calculates the total order value for John is:
=SUMIF(A2:A11,"John",C2:C11)
which gives an answer of $2,059.
The formula tests column A for the value “John”, and, if it matches John, adds the value from column C to the total. I’ve highlighted the four rows in yellow that are included.
🔗 Get this example and others in the template at the bottom of this article.