Subtotal Sumproduct?

aquapowers

New Member
Joined
Jan 17, 2008
Messages
26
Is it possible to use SUBTOTAL in conjunction with SUMPRODUCT? I'm using the following formula to calculate a weighted average price increase.
=SUMPRODUCT(N5:N3400,AQ5:AQ3400)/SUM(AQ5:AQ3400)
column N= price increase percentage
column AQ= sales

I would like to add SUBTOTAL to the formula in order to see the various weighted average increase by filtered selections.

Thank you in advance!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
SUMPRODUCT is not one of the functions offered within SUBTOTAL. Untested but you might try this, which should handle changes with filtering.
Excel Formula:
=SUBTOTAL(106,N5:N3400,AQ5:AQ3400)/SUBTOTAL(109,AQ5:AQ3400)

EDIT: after looking at this a bit, its not going to give you what you want.
 
Last edited:
Upvote 0
Try:

Book1 (version 1).xlsb
NAQAR
318.67%
416.36%
510%100
620%200
730%300
98%500
Sheet19
Cell Formulas
RangeFormula
AR3AR3=SUMPRODUCT(N5:N3400,AQ5:AQ3400)/SUM(AQ5:AQ3400)
AR4AR4=SUMPRODUCT(N5:N3400,AQ5:AQ3400,SUBTOTAL(102,OFFSET(AQ5,ROW(AQ5:AQ3400)-ROW(AQ5),0)))/SUMPRODUCT(AQ5:AQ3400,SUBTOTAL(102,OFFSET(AQ5,ROW(AQ5:AQ3400)-ROW(AQ5),0)))


Your formula in AR3, the adjusted version in AR4. I have one row hidden, and you can see that the value is different.
 
Upvote 1
Solution

Forum statistics

Threads
1,223,723
Messages
6,174,123
Members
452,546
Latest member
Rafafa

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