Microsoft Office Tutorials and References
In Depth Information
STATFUNCTION = Application.Average(rng)
Case “MEDIAN”
STATFUNCTION = Application.Median(rng)
Case “MODE”
STATFUNCTION = Application.Mode(rng)
Case “COUNT”
STATFUNCTION = Application.Count(rng)
Case “MAX”
STATFUNCTION = Application.Max(rng)
Case “MIN”
STATFUNCTION = Application.Min(rng)
Case “VAR”
STATFUNCTION = Application.Var(rng)
Case “STDEV”
STATFUNCTION = Application.StDev(rng)
Case Else
STATFUNCTION = CVErr(xlErrNA)
End Select
End Function
Figure 26-2 shows the STATFUNCTION function that is used in conjunction with a drop-down list generated
by Excel's Data Data Tools Data Validation command. The formula in cell C14 is as follows:
=STATFUNCTION(C1:C12,B14)
Search JabSto ::




Custom Search