AverageIf

Syntax

AverageIf(Range, Criteria[, AverageRange])

Parameters

Range. The range of checked cells.

Criteria. The condition that determines the cells, for which average is calculated.

NOTE. The condition may be a number, expression, cell hyperlink, text, or function.

AverageRange. The actual cells, for which average is calculated.

NOTE. All text conditions and conditions with logical mathematical characters must be enclosed in double quotation marks (").

Description

It returns the average of cells that satisfy the specified condition.

Example

Formula Result Description
=AverageIf(A0:A3, ">0", B0:B3) -2.5 Average of the array located in the B0:B3 cells provided that the A0:A3 cells have positive values. The A0:A3 range contains the following numbers: -2, 6, 4, -8. The B0:B3 range contains the following numbers: -6, 4, -9, 5.

See also:

Function Wizard │ Mathematical Functions