Forum Discussion
Tony2021
Jun 27, 2022Iron Contributor
SumProduct for Weightd Average
Hello Experts, I am trying to use SumProduct to return the weighted average of various rates and amounts for companies. How can I use SumProduct to do this? I think I need an If statement in the...
- Jun 27, 2022
The definition of the Rate range is not correct - it refers to =Confirmations!$D$34:$D$54 instead of to =Confirmations!$D$7:$D$54. If you change that, the formula will work.
HansVogelaar
Jun 27, 2022MVP
For example:
=SUM(IF(Vendor="Co A",EUR*Weight))/SUMIF(Vendor,"Co A",Weight)
or
=SUMPRODUCT((Vendor="Co A")*EUR*Weight)/SUMIF(Vendor,"Co A",Weight)
for EUR, and
=SUM(IF(Vendor="Co A",Rate*Weight))/SUMIF(Vendor,"Co A",Weight)
or
=SUMPRODUCT((Vendor="Co A")*Rate*Weight)/SUMIF(Vendor,"Co A",Weight)
for Rate.
Tony2021
Jun 27, 2022Iron Contributor
Hi Hans, thank you. I tried the 2 formulas for RATE and each of the formulas returns a #N/A. I imagine I am doing something wrong but I am not sure what it could be?
- HansVogelaarJun 27, 2022MVP
The definition of the Rate range is not correct - it refers to =Confirmations!$D$34:$D$54 instead of to =Confirmations!$D$7:$D$54. If you change that, the formula will work.
- Tony2021Jun 27, 2022Iron ContributorHi Hans, yes that was it. I had a named range error. thank you very much!