Sumproduct with subtotal with filter

pugazh

New Member
Joined
Feb 21, 2010
Messages
11
OK Formula returns value:
=IF(J$1="F1",SUMPRODUCT(SUBTOTAL(109,OFFSET($F$11,ROW($F$11:$F$200)-ROW($F$11),)),J$11:J$200,$B$11:$B$200),IF(J$1="TGA",SUMPRODUCT(SUBTOTAL(109,OFFSET($F$11,ROW($F$11:$F$200)-ROW($F$11),)),J$11:J$200,$C$11:$C$200),0))

Not returning value when additional arguments are added: What is wrong with this formula?
=IF(M$1="F1",SUMPRODUCT(SUBTOTAL(109,OFFSET($E$11,ROW($E$11:$E$200)-ROW($E$11),)),J$11:J$200,$B$11:$B$200,$L$11:$L$200=$L5),IF(M$1="TGA",SUMPRODUCT(SUBTOTAL(109,OFFSET($E$11,ROW($E$11:$E$200)-ROW($E$11),)),J$11:J$200,$C$11:$C$200,$L$11:$L$200=$L5),0))
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try...

1.

=SUMPRODUCT(SUBTOTAL(109,OFFSET($F$11,ROW($F$11:$F$200)-ROW($F$11),0)),J$11:J$200,INDEX($B$11:$C$200,0,MATCH(J$1,{"F1","TGA"},0)))

2.

=SUMPRODUCT(SUBTOTAL(109,OFFSET($E$11,ROW($E$11:$E$200)-ROW($E$11),0)),J$11:J$200,($L$11:$L$200=$L5)+0,INDEX($B$11:$C$200,0,MATCH(M$1,{"F1","TGA"},0))
 
Upvote 0
Try...

1.

=SUMPRODUCT(SUBTOTAL(109,OFFSET($F$11,ROW($F$11:$F$200)-ROW($F$11),0)),J$11:J$200,INDEX($B$11:$C$200,0,MATCH(J$1,{"F1","TGA"},0)))

2.

=SUMPRODUCT(SUBTOTAL(109,OFFSET($E$11,ROW($E$11:$E$200)-ROW($E$11),0)),J$11:J$200,($L$11:$L$200=$L5)+0,INDEX($B$11:$C$200,0,MATCH(M$1,{"F1","TGA"},0))

Excellent. It works. Thank you very much. In-fact your formula is much simpler. (y)(y)(y)
 
Upvote 0

Forum statistics

Threads
1,216,073
Messages
6,128,641
Members
449,461
Latest member
kokoanutt

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