Formualizer Docs

AVERAGEIFS

Returns the average of cells that satisfy multiple criteria.

AVERAGEIFS filters by all criteria pairs, then averages matching numeric values.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=AVERAGEIFS(average_range, criteria_range1, criteria1, [(criteria_range2, criteria2), ...])

Arguments

ArgumentTypeRequiredDefault
average_rangeanyRequired—
criteria_range1anyRequired—
criteria1anyRequired—
criteria_range2anyOptional—
criteria2anyOptional—

Accepts a variable number of arguments. Minimum: 3.

Differences from Excel

Formualizer accepts array constants as ranges. Excel requires references. An invalid INDIRECT result in the result range can raise #NAME? in Formualizer, where Excel returns #REF!.

Remarks

  • An equality criterion for a date or number ("10/26/1999", "36459", 36459) also matches text cells holding that date; <> and ordering criteria do not read date text.
  • The first argument is the average target range.
  • Criteria are supplied in (criteria_range, criteria) pairs.

Error cases

  • If no numeric cells match, the function returns #DIV/0!.

Examples

Aggregate numbers from only the East records.

Formula =AVERAGEIFS(A1:A3,B1:B3,"East")

Input cells
AB
110"East"
250"West"
320"East"

Expected result 15

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Add a second criterion so both conditions must hold.

Formula =AVERAGEIFS(A1:A3,B1:B3,"East",C1:C3,"<5")

Input cells
ABC
110"East"2
250"West"4
320"East"6

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Aggregate the only row in a single-row data set.

Formula =AVERAGEIFS(A1:A1,B1:B1,"East",C1:C1,2)

Input cells
ABC
110"East"2

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Average with two criteria

Formula =AVERAGEIFS(C1:C3, A1:A3, "East", B1:B3, ">=2025")

Input cells
ABC
1"East"202510
2"East"202440
3"West"202530

Expected result 10

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

When does AVERAGEIFS return #DIV/0!?

It returns #DIV/0! when no matching numeric cells are available to average.

Do non-numeric matched cells count in the average?

No. Only numeric target cells contribute to sum and count.

Implementation

Engine source

On this page