AVERAGEIF
Category: Statistical Function.
Description: Returns the average (arithmetic mean) of the cells in a range that meet a given criteria.
Syntax: AVERAGEIF(range, criteria, [average_range])
The range is an array of values (or range of cells containing values) that is tested against the given criteria.
If the 'average_range' argument is omitted, the values in the initial range argument are used to calculate an average.
Otherwise, the corresponding cells in the average_range array is used for calculation.