AVERAGEIF
Returns the average of all cell values in a cell-range which meet a given criterion. To specify multiple criteria please use AVERAGEIFS.
Syntax
=AVERAGEIF(DataRange, Criterion, [AverageRange])
Arguments
| Name | Type | Description | 
|---|---|---|
| DataRange | Range | Cell-range to calculate average for. | 
| Criterion | String | The criterion each cell has to fulfill. | 
| AverageRange (optional) | Range | If given, these cells are used to calculate average. If ommitted DataRange is used. | 
Return
| Type | Description | 
|---|---|
| Number | The average over all cell values which meet criterion. | 
Examples
| A | B | |
|---|---|---|
| 1 | 100000 | 200 | 
| 2 | 200000 | 400 | 
| 3 | 300000 | 400 | 
| 4 | North | 600 | 
| 5 | East | 800 | 
| 6 | South | 1000 | 
| Formula | Result | Comment | 
|---|---|---|
 | 150000 | Only cells A1 and A2 match given criterion | 
 | 800 | Take cells from column A which end with "th" and average corresponding values from column B |