multiply array with a transposed array - EASY FOR EXPERTS!!!

Joined
Mar 14, 2012
Messages
1
Reaction score
0
Hello,

I am just new to programming and have a simple problem for experienced programmers (I think!).

I have to calculate a weighted total from an array. I know in excel is is =mmult('cell range values',transpose(cellrangeyears))

I have tried using this (I could be way off) without any luck


'weighted total male
n = 6
wtm = 0
For i = 1 To 6
yi = ActiveSheet.Cells(8, 7 + i)
yii = ActiveSheet.Cells(7, 7 + i)
wtm = (yi.MMult.Transpose(yii))
Next i
ActiveSheet.Cells(8, 16) = wtm

Feel free to have a look at my attached a photo of the excel sheet to see the corresponding values, cells etc.

Anyone got any tips?

It would be greatly appreciated!

Thanks!

Tom
 

Attachments

  • Practice run picture for web.webp
    Practice run picture for web.webp
    73.6 KB · Views: 167
Back
Top