ExcelTool.io

AVERAGEIF

Averages the cells in a range that meet a condition.

Syntax

=AVERAGEIF(range, criteria, [average_range])

Arguments

  • range - The range tested against the criteria.
  • criteria - The condition to match.
  • average_range (optional) - The cells to average. If omitted, range is averaged.

Examples

=AVERAGEIF(A2:A50, "West", B2:B50)

Returns: Average of B where A is West

Same shape as SUMIF, but returns the mean.

Common Errors and Gotchas

  • Returns #DIV/0! when no cells match the criteria.
  • Quote text and comparison criteria.

Does AVERAGEIF Work in Google Sheets?

Yes. AVERAGEIF uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.

See Also