Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Square Root in VBA


If all is well with your Function, this should work:

Function test() As Variant
test1 = *SQR*(Application.MMult(Application.MMult(RegionR
CovarMatrix), _
Application.Transpose(RegionR)))
End Function

But, I have serious reservations about the entire layered-structure of
the Function, among other things.

Firstly, RegionR = Sheets("Inputs").Range(Cells(12, 3), Cells(12, 2
num_regions)).Value defines a Variant Array, not a value, an
therefore its deployment in your Function Test should generate a
error. And then again, Function RegionR() should carry an argument a
in Function *RegionR(num_regions)*. Ditto Function CovarMatrix(
---Function CovarMatrix()num_regions.

My gravest concern is with Function CovarMatrix(). None of the batter
of Array holders RegionVar(), RegionStd(), RegionStd() and CorrMatri
is defined or dimensioned leaving it questionable as to how they ca
supply the inputs for the covariance matrix.

If you can clarify the situation, that should help the cause.

David

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=48395

Reply
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
square root Mitch Easterby Excel Worksheet Functions 6 May 22nd 09 03:00 AM
square root marpad Excel Discussion (Misc queries) 4 March 23rd 07 08:09 PM
How do I get a (non-square) root of a given number caro_oax Excel Discussion (Misc queries) 3 November 20th 06 07:22 PM
Square root with a remainder xcgames Excel Worksheet Functions 4 March 26th 06 10:10 PM
How do I calculate the Root Mean Square (RMS) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Excel Discussion (Misc queries) 7 June 27th 05 01:49 PM


All times are GMT +1. The time now is 05:28 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"