Session II Part 2.
In Statistical function, we will try to use excel function in macro. The common Statistical function in excel had definied to following function :
Now, can will create 3 function formula, MIN, MAX, and MEDIAN function. Open your module and copy code below :
Function nMin(data As Range) As Currency
nMin = Excel.WorksheetFunction.Min(data)
End Function
Function nMax(data As Range) As Currency
nMax = Excel.WorksheetFunction.Max(data)
End Function
Function nMedian(data As Range) As Currency
nMedian = Excel.WorksheetFunction.Median(data)
End Function

In worksheets, the macro will shown like this :



It's so easy, you can try another function in your code. Macro in excel is very usefull in a big data processing, i show you on next article. Sorry for my english.

4 comments:
Well done for this wonderful blog.
Yutarets! kasagad bah!
yeah! thats awsome!! i like it!
berto xxx
come on to my blog,ok!!!!
Post a Comment