I am trying to place a weighted average into a summary line that covers a certain range below it. This range is dynamic.
For example:
This is what I have, but I need to get a weighted sum of 0.572 next to the 296526.43

Please Login or Register  to view this content.
The regular formula would be something like:
{=SUM(((C3:C19)/C2)*(D3:D19))}

The code that I have come up with so far is:
Please Login or Register  to view this content.
relay is the worksheet name

I keep running into a Type Mismatch error on:
Please Login or Register  to view this content.
What am I doing wrong? OR how can I change this?

Thanks