Home |
Search |
Today's Posts |
#15
![]() |
|||
|
|||
![]()
Tushar Mehta wrote...
.... . . . Nonetheless, if you do want to do down this road, you can still leverage the XL object model. Untested code: Public Function RSD(ParamArray X() As Variant) With Application.WorksheetFunction RSD = .StDev(X) / .Average(X) * 100 End With End Function You didn't tortute test this. With A1:B2 containing {1,2;3,4}, =RSD(A1:B2) returns #VALUE! =RSD({1,2},{3;4}) returns #VALUE! =RSD({1;2}) returns #VALUE! The problem is with the functions called via Application.WorksheetFunctions. Those functions can handle ParamArray arrays only in very limited situations. Either all arguments must be simple numbers (scalars) or all simple horizontal arrays of the same size. These functions can't even handle a single range argument if it's wrapped as a ParamArray. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a range name as an argument to the Index Function | Excel Discussion (Misc queries) | |||
Sumproduct + Array Function? | Excel Worksheet Functions | |||
Code to determine if a cell contains an array function? | Excel Discussion (Misc queries) | |||
Array Function with VLOOKUP | Excel Worksheet Functions | |||
Need a ISWorkday Function -- Any Ideas | Excel Worksheet Functions |