average in macros


Posted by derrick on November 12, 2001 1:05 PM

looking to use the average function in a macro... Any suggestions?

thanks

Posted by faster on November 12, 2001 1:10 PM

here is an example:

Sub UseAverage()
'of course use your own data
MsgBox Application.WorksheetFunction.Average(50, 75, 100)
End Sub



Posted by derrick on November 12, 2001 1:17 PM

thanks

Thanks, 'WorksheetFunction.Average' was what i was looking for.