AVERAGEIF function computes the average of the numbers in a range that meet the supplied criteria. The criteria for AVERAGEIF supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.
Purpose of Excel AVERAGEIF Function
Get the average of numbers that meet criteria.
A number representing the average.
=AVERAGEIF (range, criteria, [average_range])
|range||One or more cells, including numbers or names, arrays, or references.||Mandatory|
|criteria||A number, expression, cell reference, or text.|
|average_range||The cells to average. When omitted, range is used.||Optional|
- Cells in range that contain TRUE or FALSE are ignored.
- Empty cells are ignored in range and average_range when calculating averages.
- AVERAGEIF returns #DIV/0! if no cells in range meet criteria.
- Average_range does not have to be the same size as range. The top left cell in average_range is used as the starting point, and cells that correspond to cells in range are averaged.
- AVERAGEIF allows the wildcard characters question mark (?) and asterisk (*), in criteria.
- The ? matches any single character and the * matches any sequence of characters.
- To find a literal ? or , use a tilde (~) before the character, i.e. ~ and ~?.
Since 2007 for Windows.
Since 2011 for Mac.