Skip to main content
Version: Streamsheets 2.5

AVERAGEIF

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

Syntax

=AVERAGEIF(DataRange, Criterion, [AverageRange])

Arguments

NameDescription
DataRangeCell-range to calculate average for.
CriterionThe criterion each cell has to fulfill.
AverageRange (optional)If given these cells are used to calculate average. If ommitted DataRange is used.

Return

The average over all cell values which meet criterion.

Examples

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