LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Matrix manipulation in vba code

I should have mentioned that if you want to do it similar to your code,
just adjust vector B like this...

Sub Demo()
Dim A As Variant
Dim B(1 To 4, 1 To 1)
Dim C As Variant

A = [{2,2,1,3;1,3,4,4;5,4,1,5;5,4,3,4}]

B(1, 1) = 5
B(2, 1) = 4
B(3, 1) = 3
B(4, 1) = 2

With WorksheetFunction
If Abs(.MDeterm(A)) < 0.0000000001 Then
MsgBox "A is Singular"
Exit Sub
End If

C = .MInverse(A)
C = .MMult(C, B)
End With
End Sub

= = =
HTH :)
Dana DeLouis
 
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
For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation vmegha Excel Programming 2 December 19th 05 12:14 AM
Generating Code in Excel / Macro Recorder Manipulation [email protected] Excel Programming 2 August 18th 05 03:31 PM
Code for Access file manipulation from Excel Tom Urtis Excel Programming 0 July 21st 05 08:31 AM
VBA code manipulation cells Craig[_21_] Excel Programming 2 April 10th 05 10:06 AM
Halting code for worksheet manipulation? What-a-Tool[_2_] Excel Programming 2 November 5th 04 12:09 AM


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