Call worksheet function directly : Excel Buildin Function « Excel « VBA / Excel / Access / Word






Call worksheet function directly

 
Sub refStatse()
    Debug.Print "MIN: " & Application.WorksheetFunction.Min(Range("A1:A10"))
    Debug.Print "MAX: " & Application.WorksheetFunction.Max(Range("A1:A10"))
    Debug.Print "SUM: " & Application.WorksheetFunction.Sum(Range("A1:A10"))
    Debug.Print "AVG: " & Format(Application.WorksheetFunction.Average(Range("A1:A10")), "#0.00")
End Sub

 








Related examples in the same category

1.Use function from Excel
2.Payment Function:Pmt (interest, term, principal, future value, type)
3.Using Excel Application Functions in VBA
4.Cleans up every selected cell: with Proper function
5.Calculate a moving average
6.Sum a Range