WorksheetFunction.sumproduct limits?

G

Guest

Greetings and TIA for your time

With columns AA and AB blank, the WorksheetFunction.sumproduct in the code
below returns zero as expected. Increasing the size of Array1 & Array2 by 1
element to 5462 or beyond results in a "Type Missmatch" error message.
Please advise

Sub TestSumProduct()
Dim Array1 As Variant
Dim Array2 As Variant

Array1 = Range("AA1:AA5461").Value
Array2 = Range("AB1:AB5461").Value
MsgBox WorksheetFunction.SumProduct(Array1, Array2)
End Sub
 
M

ManualMan

Hi,

It might be coincidence, but: 5462 * 12 = the max amount of rows in an
Excel sheet (65532). It might very well be that the sumproduct function
may only contain 5462 * 12 chunks of data
But this is pure speculation

ManualMan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top