Statistics [WksRange]

 

The Statistics method calculates statistics on all the columns in the range. Returns a WksStatistics object.

 

Syntax

object.Statistics( Sample, Header, Flags )

 

Parameter

Type

Description

Sample

Boolean

optional; default=0, calculate statistics according to sample or population

Header

Boolean

optional; default=0, labels in first row

Flags

Long

optional; default=0, statistics to compute, the WksStats enumeration can be used for this parameter.

 

Remarks

See Specifying Cell Coordinates for more information on selecting cells.

 

Example

This example demonstrates how to print the mean of column A.

 

Set stats = WksRange. Statistics (Flags:=wksStatsMean)

Debug.Print stats.Mean

 

Used by: WksRange object