What is the AVERAGEIFS function?
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)AVERAGEIFS averages only the values in rows that meet every condition, such as the average apple sales outside Seoul.
It adds the values of the rows that meet all the conditions while counting them, then divides the total by the count. Unlike AVERAGEIF, average_range comes first, as in SUMIFS.
Arguments
- average_range
- The cells to average. The first argument.
- criteria_range1, criteria1
- The range for the first condition and the condition.
- criteria_range2, criteria2, ...
- Optional. More pairs. Every criteria range must be the same size as average_range.
AVERAGEIFS examples
Example 1. Average apple sales outside Seoul
=AVERAGEIFS(D2:D9, B2:B9, "Apple", A2:A9, "<>Seoul")The average of Daegu apples 30000 and Busan apples 37500 is 33750. This is how the sheet first opens.
Example 2. Average quantity of Seoul orders of 10 or more
=AVERAGEIFS(C2:C9, A2:A9, "Seoul", C2:C9, ">=10")Of Seoul's 30, 8 and 40, the 8 is left out; the average of 30 and 40 is 35. average_range and a criteria range can be the same column.
Example 3. No matching rows
=AVERAGEIFS(D2:D9, A2:A9, "Seoul", B2:B9, "Coffee")Seoul has no coffee orders, so the count is 0 and the result is #DIV/0!.
Common mistakes
Using the AVERAGEIF order
average_range is last in AVERAGEIF but first in AVERAGEIFS. Swapping them averages the wrong column.
Ranges of different sizes
Unlike AVERAGEIF, every criteria range must match average_range in size, or you get #VALUE!.
Leaving #DIV/0! visible
If no row meets every condition, you get #DIV/0!. Wrap it: =IFERROR(AVERAGEIFS(…), "-").
FAQ
- Blank cells in average_range?
- Cells that are not numbers are left out; the steps mark them as left out.
- How many conditions?
- Up to 127 range/criteria pairs.
- Why does it differ from AVERAGEIF?
- AVERAGEIFS uses only rows that meet every condition. With one condition the results are the same.