Excel - AVERAGEIFS Function



AVERAGEIFS Function

Two main variations of the AVERAGE function are the AVERAGEIF and AVERAGEIFS functions. The common functionality between these two functions is to compute the average of the specified cell ranges, except that the first version is based on a single condition, and the second version is based on multiple criteria to calculate the average.

In other words, The EXCEL AVERAGEIFS function retrieves the arithmetic mean of the array depending on the Boolean conditions.

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel Web App
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the AVERAGEIFS function is as follows −

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2] ...)

Arguments

You can use the following arguments with the AVERAGEIFS function −

Argument Description Required / Optional
Average_range It may contain numeric values or arrays, or cell references that points to numbers required to get the arithmetic mean. Required
Criteria_range1 1 to 127 ranges in which to compute the corresponding criteria. Required
Criteria_range2,... Optional
Criteria1 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which cells will be averaged Required
criteria2, ... Optional

Points to Remember

  • If the average_range contains a blank cell or letters, then the AVERAGEIFS function will retrieve the #DIV/0! Error.
  • Wild card characters(?, *) are used by the AVERAGIFS function. A question mark (?) is defined to match the atomic character and asterisk is used to defined to match the multiple characters.
  • All the criteria_ranges must be of the equivalent length and same shape.
  • If the blank cell is specified in a criteria range, the function considered it as 0 value.
  • If either of the condition is FALSE, then the AVERAGEIFS function will retrieve the #DIV/0! Error.
  • A cell reference argument points to empty value in the criteria range, then the AVERAGEIFS function will return the #VALUE! error.

Examples of AVERAGEIFS Function

Practice the following examples to learn the use of the AVERAGEIFS function in Excel.

Example 1: AVERAGEIFS Formula with two Criteria

In this example, the AVERAGEIFS function uses two conditions. If both conditions are fulfilled, the average of the North and South regions is to be evaluated separately.

Solution

Step 1 − First, Consider the sample dataset, which depicts the Sales of the different regions in the cell range C3:C10.

AVERAGEIFS Function

Step 2 − After that, enter the formula =AVERAGEIFS(C2:C9,C2:C9,"=5000",B2:B9,"=North") in the D2 cell and hit the Enter. Here, the first condition is the cell range C2:C9 must be equal to 5000, and the other condition is that the cell range B2:B9 must be equal to North. If both conditions are TRUE, then the average will be calculated. Otherwise, the error may be countered.

AVERAGEIFS Function 1

AVERAGEIFS Function 2

Step 3 − Furthermore, we can evaluate the sales average with values greater than 5000 in the South region. Write the formula =AVERAGEIFS(C3:C10,C3:C10,">5000",B3:B10,"=South") in the D3 cell and hit the Enter.

AVERAGEIFS Function 3

Therefore, the AVERAGEIFS function retrieves the result of 5900.

AVERAGEIFS Function 4

Example 2: AVERAGEIFS Function with Multiple Criteria

We will explore the AVERAIFS function where various conditions corresponding to the respective criteria range are defined. If all the conditions are TRUE, only then does the AVERAAGEIFS function return the averages of the given set of the cell range.

Solution

First, select the cell D4 and write the formula =AVERAGEIFS(C3:C10,C3:C10,"<6000",C3:C10,">5000",B3:B10,"=South").

AVERAGEIFS Function 5

Therefore, all the defined criteria are correct, and the AVERAGEIFS function will return the 5800 as a result.

AVERAGEIFS Function 6

Download Practice Sheet

You can download and use the sample data sheet to practice the AVERAGEIFS function.

Advertisements