I want to use sumproduct to get a weighted average using named ranges because the data size changes from time to time.
I have this snippet:
Dim a, b As Range
a = Range("T" & Top & ":T" & Bottom)
b = Range("S" & Top & ":S" & Bottom)
Range("H5") = Application.SumProduct (a, b) / b
Top and Bottom are variables, it crashes on the sumproduct line.
I would really appreciate someone with superior knowledge helping me out, thank you