Skip to main content
Version: Streamsheets 2.5

SUMIF

Returns the sum of all cell values in a cell-range which meet a given criterion. To specify multiple criteria please use SUMIFS.

Syntax

=SUMIF(DataRange, Criterion, [SumRange])

Arguments

NameDescription
DataRangeCell-range to calculate sum for.
CriterionThe criterion each cell has to fulfill.
SumRange (optional)If given these cells are used to calculate total sum. If omitted DataRange is used.

Return

The sum of all cell values which meet criterion.

Examples

AB
1100000200
2200000400
3300000400
4North600
5East800
6South1000
FormulaResultComment
SUMIF(A1:A3, "250000")
300000Only cells A1 and A2 match given criterion.
SUMIF(A1:A6, "=*th", B1:B6)
1600Take cells from column A which end with "th" and average corresponding values from column B.