How to Use AverageIf Function in Excel [Solved]

How to Use AverageIf Function in Excel

Description

Excel LogoThe 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 Microsoft Excel AVERAGEIF function is:

AVERAGEIF( range, criteria, [average_range] )

Parameters or Arguments

range is the range of cells that you want to apply the criteria against.

criteria is used to determine which cells to average.

average_range is optional. It is the cells to average. If average_range is omitted, AVERAGEIF uses range as the value for this parameter.

Applies To

The AVERAGEIF function can be used in the following versions of Microsoft Excel:

  • Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007

Type of Excel Function

The AVERAGEIF function can be used in Microsoft Excel as the following 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:

Microsoft Excel

Based on the spreadsheet above, the following Excel AVERAGEIF examples would return:

=AVERAGEIF(A2:A7, 2012, B2:B7) would return 8.2
=AVERAGEIF(A:A, 2011, B:B) would return 10
=AVERAGEIF(A2:A7, “>=2012”, B2:B7) would return 7.8
=AVERAGEIF(A2:A7, “<2013”) would return 2011.2

Credit: http://www.techonthenet.com/excel/formulas/averageif.php