The AVERAGEIFS function

Returns the average of the cells that meet every one of several conditions. The average range comes first.

Syntax

AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
average_range
The cells to average.
criteria_range1
The cells the first condition is checked against.
criteria1
The first condition.
criteria_range2, criteria2 (optional)
More range and condition pairs.

Examples

E1=AVERAGEIFS(C2:C6,A2:A6,"North",B2:B6,"Shoes")
ABCDE
1RegionProductSales460
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

In plain words: Average the sales in C2:C6 on the rows where the region in A2:A6 is North and the product in B2:B6 is Shoes.

E1=AVERAGEIFS(C2:C6,A2:A6,"South",C2:C6,">0")
ABCDE
1RegionProductSales240
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

Practice AVERAGEIFS

Related functions