AVERAGEIF
Syntax:
AVERAGEIF ( cell-range , selection-criteria [ , average-range ] )
Description: Applies selection criteria on the values in one range of cells and averages the values of the cells in a corresponding range.
Arguments:
Name |
Type |
Description |
---|---|---|
cell-range |
reference |
The range of cells to be inspected. Cells in cell-range that contain |
selection-criteria |
number, expression, reference, text |
Designates the cells that are to be averaged. In the case of text, selection-criteria can consist of any comparison operator followed by the operand against which each cell's value is to be compared. selection-criteria can include one or more wildcard characters, question mark ( |
average-range |
reference |
Designates the cells whose values are averaged. In this case, average-range need not have the same size and shape as cell-range. The actual cells that are averaged are determined by using the top, left cell in average-range as the beginning cell, and then including cells that correspond in size and shape to cell-range. If average-range is omitted, cell-range also designates the cells whose values are averaged. If a cell is an empty cell, it is ignored. |
Return Type and Value: number – The average of the values of the cells corresponding to those selected.
However, if no cells in the range meet the criteria, the return value is unspecified.