VBA Excel , Arrays multiplication using SumProduct WorkSheet function RRS feed

  • Question

  • Hello Every body,
    I would like to multiply two single dimension arrays, having 5 elelments in each.
    I prefer to use the SumProduct WorkSheet function.
    I wrote this kind of line (below) but got a run time error #1004.
    X = Application.WorksheetFunction.SumProduct(Array_1, Array_2)
    I would like X to be the sum of the elelments multiplication of the two arrays.
    Thanks for your  kind help,


    Saturday, April 28, 2012 11:22 AM

All replies

  • How are you declaring and populating the arrays? In a quick test, it appears to work OK.

    Regards, Hans Vogelaar

    Saturday, April 28, 2012 11:28 AM