Subtotal all the sumproducts in cells above.

StephenSLR

New Member
Joined
May 24, 2018
Messages
28
Office Version
  1. 365
Platform
  1. Windows
In cell E88 I have the formula =SUMPRODUCT(B84:B86,E84:E86)

In cell E121 I have the formula =SUMPRODUCT(B92:B119,E92:E119)

and so on for many other subtotal cells in the E column.

I would like to incorporate all the Sumproducts into Subtotals so I can add up all instances of the Sumproducts at the bottom of my spreadsheet with a single subtotal formula at the last cell in column E at the bottom.

What is the best way to do this?

s
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
.
The simpliest method would be to set aside a single cell for your GRAND TOTAL and use a formula =SUM(E88,E121, etc. etc.)
 
Upvote 0
a single cell for your GRAND TOTAL and use a formula =SUM(E88,E121, etc. etc.)

Thanks.

That's something I would do if I had no choice but I find it can lead to errors if I add in rows and forget to update the Grand Total cell and my sheets can be very long so a chance of error if I don't include every cell with a Sumproduct formula.

s
 
Last edited:
Upvote 0
assuming your subtotals are the only cells with formulas, something like this maybe?


Book1
AB
11020
21020
31020
41020
51020
61020
71020
8Subtotal210
9
103040
113040
123040
133040
143040
153040
163040
173040
18Subtotal560
19
20Grandtotal770
Sheet14
Cell Formulas
RangeFormula
B8=SUM(A1:B7)
B18=SUM(A10:B17)
B20{=SUM((--(ISFORMULA(B1:B19)=TRUE))*(B1:B19))}
Press CTRL+SHIFT+ENTER to enter array formulas.


this is my first time working with what i think are arrays so i hope it works
 
Upvote 0
assuming your subtotals are the only cells with formulas

Unfortunately just about every cell includes a formula; they either include the no. of hours x rate or a percentage of hours taken to complete a job, etc.

s
 
Last edited:
Upvote 0
maybe something like this?


Book1
ABC
1UnitsPriceTotal
232060
332060
432060
532060
632060
732060
832060
9Subtotal420
10
1114040
1214040
1314040
1414040
1514040
1614040
1714040
1814040
19Subtotal320
20
21Grandtotal740
Sheet14
Cell Formulas
RangeFormula
C2=B2*A2
C9=SUMPRODUCT(A2:A8,B2:B8)
C19=SUMPRODUCT(A11:A18,B11:B18)
C21{=SUM((--(ISNUMBER(SEARCH("SUMPRODUCT",FORMULATEXT(C2:C20)))))*(C2:C20))}
Press CTRL+SHIFT+ENTER to enter array formulas.


however this wouldnt work if any cell in the range is text. i think it's because using FORMULATEXT on a cell with text returns an error and i dont know how to work around it. so for example if i changed the range in my C21 formula to C1:C20 which would include the column heading which is text then you'd get an error in the grand total
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

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