Syntax

expression.AverageIf(Arg1, Arg2, Arg3)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data Type Description
Arg1 Required Range One or more cells to average.
Arg2 Required Variant The criteria in the form of a number, expression, cell reference, or text that defines which cells are averaged. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.
Arg3 Optional Variant The actual set of cells to average. If omitted, range is used.

Return Value
Double

Remarks

Note
The AverageIf method measures central tendency, which is the location of the center of a group of numbers in a statistical distribution. The three most common measures of central tendency are:

For a symmetrical distribution of a group of numbers, these three measures of central tendency are all the same. For a skewed distribution of a group of numbers, they can be different.

See also: