Description
The Microsoft Excel AVERAGEIF function returns the average (arithmetic mean) of all numbers in a range of cells, based on a given criteria.
Syntax
The syntax for the AVERAGEIF function in Microsoft Excel is:
AVERAGEIF( range, criteria, [average_range] )
Parameters or Arguments
- range
- The range of cells that you want to apply the criteria against.
- criteria
- The criteria used to determine which cells to average.
- average_range
- Optional. It is the cells to average. If average_range is omitted, it uses range as the value for this parameter.
Applies To
- Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007
Type of Function
- Worksheet function (WS)
Example (as Worksheet Function)
Let's look at some Excel AVERAGEIF function examples and explore how to use the AVERAGEIF function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following AVERAGEIF examples would return:
=AVERAGEIF(A2:A7, 2012, B2:B7) Result: 8.2 =AVERAGEIF(A:A, 2011, B:B) Result: 10 =AVERAGEIF(A2:A7, ">=2012", B2:B7) Result: 7.8 =AVERAGEIF(A2:A7, "<2013") Result: 2011.2