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.jpg
    Practice run picture for web.jpg
    148.6 KB · Views: 161

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