AVERAGEIF can be used to average cells based on dates, numbers, and text.

Whenaverage_rangeis not provided, AVERAGEIF will average values in therangeargument.

Whenaverage_rangeis provided, AVERAGEIF will average values inaverage_range.

Excel formula: Average numbers ignore zero

However, when alogical operatoris included with a number, the number and operator must be enclosed in quotes.

Note the difference in the two examples below.

Double quotes are also used for text values.

Excel formula: Average and ignore errors

Notice the less thanoperator(which is text) is enclosed in quotes.

Wildcards

Thewildcardcharacters question mark (?

), asterisk(*), or tilde (~) can be used in criteria.

Article image

A question mark (?)

matches any one character and an asterisk (*) matches zero or more characters of any kind.

For example, to match a literal question mark (?

Article image

~?, ~*, ~~).

In some cases, this behavior can create a result thatseemsreasonablebut is in factincorrect.

For an example of this problem,see this article.

Excel AVERAGEIFS function

AVERAGE Function

The Excel AVERAGE function calculates the average (arithmetic mean) of supplied numbers.

AVERAGEA Function

The Excel AVERAGEA function returns the average of a set of supplied values.

Excel AVERAGE function

Excel AVERAGEA function