Syntax
AVERAGEIF(range, criteria, [average_range])- range
- The cells the condition is checked against.
- criteria
- The condition, such as "North" or ">300".
- average_range (optional)
- The cells to average. If left out, range itself is averaged.
Examples
E1
=AVERAGEIF(1A2:A6,2"North",3C2:C6)| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 390 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |
In plain words: Average the 3sales in C2:C6 on the rows where 1the region in A2:A6 is 2North.
E1=AVERAGEIF(B2:B6,"Bags",C2:C6)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 215 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |