AVERAGEIF

averages cells that match a condition · from excel · excel: not yet compared · sheets: not yet compared

signature

AVERAGEIF(range, criteria, [average_range])

returns: number

argumentrequired
range required
criteria required
average_range optional

examples

formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.

A
1 10
2 20
3 30
fx =AVERAGEIF(A1:A3, ">15") 25

errors

error values observed from the engine — each with a call that produces it.

errorproduced by
#DIV/0! =AVERAGEIF(A1:A3, TRUE)

related

  • AVEDEV average of absolute deviations from the mean
  • AVERAGE.WEIGHTED average of values weighted by a second range
  • AVERAGEA averages values including text and logicals
  • AVERAGEIFS averages cells matching multiple conditions
  • BETA.DIST beta distribution
  • BETA.INV inverse of the beta distribution