AVERAGEIF function in Google Sheets
Returns the average of a range depending on criteria.
=AVERAGEIF(criteria_column, criterion, average_column)AVERAGEIF syntax and parameters
Three arguments, two required.
- criteria_columnrangeRequired
The data column to check against `criterion`.
- criterionanyRequired
The pattern or test to apply to `criteria_column`.
- average_columnrangeOptional
The data column to average. If not included, `criteria_column` is used for the average instead.
AVERAGEIF examples
Formulas you'll actually reuse.
Average deal size for the West region only:
=AVERAGEIF(A2:A100, "West", C2:C100)Result
8450Average of the deals over $1,000, ignoring the small ones:
=AVERAGEIF(C2:C100, ">1000")Result
4820
AVERAGEIF in Excel
Same name — your formula ports as-is.
Try AVERAGEIF in the playground
Edit the example — nothing to install.
Preloaded with the AVERAGEIF formula from Example 1 — change anything and watch it respond.
AVERAGEIF errors
What they mean — and the fixes.
#DIV/0!No cell matched the criterion, so there was nothing to average — verify the criterion text matches the data exactly.
Related functions
More ways Google Sheets gets this done.
- FORECAST.LINEARSeeStatisticalExcel
- RANKReturns the rank of a specified value in a dataset.StatisticalExcel
- CELLReturns the requested information about the specified cell.InfoExcel
- CSCReturns the cosecant of an angle provided in radians. .MathExcel
- FILTERReturns a filtered version of the source range, returning only rows or columns which meet the specified conditions.FilterExcel
- FINDReturns the position at which a string is first found within text.TextExcel