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
| Argument | Type | Required | Default |
|---|---|---|---|
average_range | any | Required | — |
criteria_range1 | any | Required | — |
criteria1 | any | Required | — |
criteria_range2 | any | Optional | — |
criteria2 | any | Optional | — |
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")
| A | B | |
|---|---|---|
| 1 | 10 | "East" |
| 2 | 50 | "West" |
| 3 | 20 | "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")
| A | B | C | |
|---|---|---|---|
| 1 | 10 | "East" | 2 |
| 2 | 50 | "West" | 4 |
| 3 | 20 | "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)
| A | B | C | |
|---|---|---|---|
| 1 | 10 | "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")
| A | B | C | |
|---|---|---|---|
| 1 | "East" | 2025 | 10 |
| 2 | "East" | 2024 | 40 |
| 3 | "West" | 2025 | 30 |
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?.
Related functions
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.