Private Sub GetCalculate4()
Dim iMassiv1#(1 To 100), iMassiv2#(1 To 100)
Dim iCount%, iSumProduct#
For iCount = 1 To 100
iMassiv1(iCount) = Rnd * 1000
iMassiv2(iCount) = Rnd * 1000
Next
iSumProduct = Application.SumProduct(iMassiv1, iMassiv2)
End Sub
Private Sub GetCalculate5()
Dim iMassiv#(1 To 100, 1 To 5), iSumProduct#
Dim iColumn%, iRow%
For iColumn = 1 To 5
For iRow = 1 To 100
iMassiv(iRow, iColumn) = Rnd * 1000
Next
Next
With Application
iSumProduct = .SumProduct( _
.Index(iMassiv, 0, 1), .Index(iMassiv, 0, 5))
End With
End Sub
Столбцы с номерами 1 и 5 используются только в качестве примера.