VBA code for Matrix Multiplication

Milade8080

New member
Joined
Mar 13, 2014
Messages
19
Reaction score
0
Points
0
sheet 1 ----> [Matrix A]m*n Current Region for start --->cell A1
sheet 2 ----> [Matrix B]n*k Current Region for start --->cell A1

sheet 3 ----> [Matrix A]*[Matrix B]

I need to VBA code for Matrix Multiplication in sheet3 ,Just by pressing a button key (
In other words, no need to pick out the array of the matrix)

Can someone help me? Tanks
 

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
can you attach a sample file ? just an example
Code:
Sub RangeMultiply()
  Sheet3.Range("A1:E3") = Evaluate("Sheet1!A1:E3*Sheet2!A1:E3")
End Sub
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Do you mean SUMPRODUCT or MMULT in Excel function terms?
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Sorry, I don't understand that.
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Ah cross-posting, glad I didn't waste any time on that then.
 
Top