Need Help: Problem with MMULT function for large matrices

yogeshparte

New Member
Joined
Apr 3, 2006
Messages
1
Hello!
I am using VBA for Excel 2002 and facing problem to use worksheet function Mmult. I want to multiply X1[4X5] matrix with X2[5X1422] matrix. The code I wrote is as follows

With Application.WorksheetFunction

X1 = Range("B4:F7").Value
X2 = .Transpose(Range("H20:L1422").Value)
Y = .Transpose(.MMult(X1, X2))
End With

If I run this code I get the error no. 1004. All entries in Matrix X1 and X2 are double and non-empty.
However, if I reduce X2 matrix size to [5X1360] code runs without any errors producing correct results. How can I solve this problem? I have sample size of 1422 and not 1360.
With regards,
YP
--------
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Referencing http://www.mrexcel.com/archive/Formulas/6487.html (see the very bottom of the thread), it seems "the maximum number of elements in array that can be passed 'to Excel using the Excel Transpose function is 5461.'"

So, your returning a 4x1422 (5688 cell) array exceeds Excel's array limitations.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top