Skip to main content
Version: Streamsheets 2.3

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.
AverageRangeOptional. If given these cells are used to calculate average. If ommitted DataRange is used.

Return Value

The average over all cell values which meet criterion.

Example

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