SUMPRODUCT Multiply and Divide

ddd2009

New Member
Joined
Oct 3, 2014
Messages
16
Office Version
  1. 365
Hi all

Help! I need to proportion how much in Column C relates to amount column E based on the gross amount in column A (C/E*/A) or (E/A*C) etc. If I manually calculate and add each row individually the total is 6.97 but my formula for all returns 7.30. My example below is a condensed version, I have many rows with 0 value in all columns.

[TABLE="width: 663"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]652.72[/TD]
[TD]0[/TD]
[TD]4.22[/TD]
[TD]0[/TD]
[TD]488.52[/TD]
[/TR]
[TR]
[TD]594.72[/TD]
[TD]0[/TD]
[TD]2.48[/TD]
[TD]0[/TD]
[TD]594.72[/TD]
[/TR]
[TR]
[TD]556.36[/TD]
[TD]0[/TD]
[TD]1.33[/TD]
[TD]0[/TD]
[TD]556.36
[/TD]
[/TR]
</tbody>[/TABLE]

=SUMPRODUCT(--(Data!$E$2:$E$108<>0),Data!$C$2:$C$108)*SUMPRODUCT(Data!$E$2:$E$108)/SUMPRODUCT(--(Data!$E$2:$E$108<>0),Data!$A$2:$A$108)

Thank you in advance and any help on this will be greatly appreciated.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Maybe...

Array formula
=SUM(IF(Data!$A$2:$A$108<>0,Data!$E$2:$E$108/Data!$A$2:$A$108*Data!$C$2:$C$108))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top