Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Application.WorksheetFunction.MMult

This might be 3 different ways for the Dot product if one is passing a
vertical array.


Function Test(myVector) As Variant
With Application.WorksheetFunction

' If you want the Dot Product, one can use
Test = .Transpose(myVector)
Test = .MMult(Test, .Transpose(Test))(1)

' or... (Reverse the order)
Test = .MMult(.Transpose(myVector), myVector)(1)

' or...
Test = .SumProduct(myVector, myVector)

' 3*3 Array
Test = .MMult(myVector, .Transpose(myVector))
End With
End Function

Sub TestIt()
Dim Answer
[A1] = 7
[A2] = 8
[A3] = 9
Answer = Test([A1:A3].Value)
End Sub


--
Dana DeLouis
= = = = = = = = = = = = = = = = =

<snip


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
Reuse Application.WorksheetFunction jlclyde Excel Discussion (Misc queries) 4 March 12th 09 08:32 PM
Application.WorksheetFunction error Ayo Excel Discussion (Misc queries) 4 May 16th 08 05:04 PM
Need help with Application.WorksheetFunction Ayo Excel Discussion (Misc queries) 4 May 14th 08 11:13 PM
application.worksheetfunction.mmult help Alex[_13_] Excel Programming 2 October 29th 03 10:13 PM
Using Application.WorksheetFunction.Ln(...) in VBA doco Excel Programming 4 August 25th 03 01:08 PM


All times are GMT +1. The time now is 07:30 PM.

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"