Sunday, June 29, 2008

Three common Statistical function Formula

Macro for Statistical function Formula
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

Statistical function Macro 1

In worksheets, the macro will shown like this :


Statistical function Macro 2

Statistical function Macro 3

Statistical function Macro 4


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:

gambling said...

Well done for this wonderful blog.

free lotto said...

Yutarets! kasagad bah!

berto xxx said...

yeah! thats awsome!! i like it!


berto xxx

taniqu said...

come on to my blog,ok!!!!