Returns the average of a data column depending on criteria.
Sample Usage
AVERAGEIF(table_name!score, “>90”)
AVERAGEIF(table_name!frits, “Apple”, “>”)
AVERAGEIF(table_name!score, “>”, B2)
Syntax
AVERAGEIF(criteria_column, criterion, average_column)
criteria_column
: The data column to check against `criterion`.criterion
: The pattern or test to apply to `criteria_column`.average_column
: The data column to average. If not included, `criteria_column` is used for the average instead.
Sample Usage
AVERAGEIF(A1:A10, ">20", B1:B10)
AVERAGEIF(A1:A10, "<10")
AVERAGEIF(A1:A10, "Paid", B1:B10)
AVERAGEIF(A1:A10, "<"&B1)
Syntax
AVERAGEIF(criteria_range, criterion, [average_range])
-
criteria_range
- The range to check againstcriterion
. -
criterion
- The pattern or test to apply tocriteria_range
.- Equals:
"text"
or1
or"=text"
or"=1"
- Greater than:
">1"
- Greater than or equal to:
">=1"
- Less than:
"<1"
- Less than or equal to:
"<=1"
- Not equal to:
"<>1"
or"<>text"
- Equals:
-
average_range
- [ OPTIONAL ] - The range to average. If not included,criteria_range
is used for the average instead.
See Also
AVERAGE
: The AVERAGE function returns the numerical average value in a dataset, ignoring text.
AVERAGEA
: Returns the numerical average value in a dataset.
AVERAGEIFS
: Returns the average of a range depending on multiple criteria.
SUMIF
: Returns a conditional sum across a range.
COUNTIF
: Returns a conditional count across a range.
IF
: Returns one value if a logical expression is `TRUE` and another if it is `FALSE`.
MEDIAN
: Returns the median value in a numeric dataset.