=AVERAGEIF(range, criteria, [average_range])
Range: The range of cells that you want to evaluate.
Criteria: The criteria in the form of a number, expression, cell reference, or text that define which cells will be averaged.
Average_range: (optional) The range of cells to average. If omitted, range is used.