LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Harlan Grove
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a range name as an argument to the Index Function Michael Sharpe Excel Discussion (Misc queries) 3 September 5th 12 01:33 PM
Sumproduct + Array Function? Darren Hill Excel Worksheet Functions 4 September 8th 05 01:47 PM
Code to determine if a cell contains an array function? [email protected] Excel Discussion (Misc queries) 1 August 29th 05 10:35 PM
Array Function with VLOOKUP CoRrRan Excel Worksheet Functions 15 April 8th 05 05:54 PM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"