Skip to main content
Version: Streamsheets 3.0

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

NameTypeDescription
DataRangeRangeCell-range to calculate sum for.
CriterionStringThe criterion each cell has to fulfill.
SumRange (optional)RangeIf given these cells are used to calculate total sum. If omitted DataRange is used.

Return

TypeDescription
NumberThe 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.