# Excel2007 new AverageIf function usage and introduction

Source: Internet
Author: User
Tags empty

AverageIf function

The AverageIf function in Microsoft Excel returns the average (arithmetic average) of all cells within a range that meet a given condition.

Grammar

AverageIf (range, Criteria,average_range)

Syntax parameters

Range required.　One or more cells to calculate the average, including numbers or names, arrays, or references that contain numbers. Criteria required. A condition in a number, expression, cell reference, or text form that defines which cells are averaged. For example, a condition can be expressed as 32, "32", ">32", "apple", or B4.

Average_range Optional. The actual set of cells to calculate the average. If omitted, the range is used.

Average_range ignores cells that contain TRUE or FALSE in the range. If the cell in Average_range is an empty cell, AverageIf ignores it.

If the range is a null value or a text value, AverageIf returns #DIV0! The error value.

If the cell in the condition is an empty cell, AverageIf treats it as a value of 0.

If there are no cells in the range that meet the criteria, AverageIf returns #DIV/0! The error value. You can use wildcard characters in a condition, that is, a question mark (?) and an asterisk (*). The question mark matches any single character, and the asterisk matches any sequence of characters.

If you want to find the actual question mark or asterisk, type the tilde (~) before the character. Average_range does not have to be the same size and shape as the range. The actual cells that are averaged are determined by using the upper-left cell in average_range as the starting cell, and then adding a cell that corresponds to the size and shape of the range.

Example:

 If the range is and Average_range is The actual cell of the calculation is A1:a5 B1:b5 B1:b5 A1:a5 B1:b3 B1:b5 A1:b4 C1:d4 C1:d4 A1:b4 C1:d2 C1:d4

Related Keywords:
Related Article

## E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

## Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

## Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth \$300-1200 USD