Combining SUMIFS and SUMTOTAL

Roo1799

New Member
Joined
Jan 27, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm trying to combine SUBTOTAL with SUMIFS using SUMPRODUCT but the formula is returning zero and I cannot figure it out!

=SUMPRODUCT(SUBTOTAL(9,OFFSET(Fcst_scenarios!I2,ROW(Fcst_scenarios!I:I)-ROW(Fcst_scenarios!I2),0)),(Fcst_scenarios!AB:AB=AT!C12)&(Fcst_scenarios!A:A=AT!D9)+0)

Sum values are coming from Fcst_scenarios Column I
The 2 criterias to meet are in cell AT!C12 & AT!D9 - with the range being in Fcst_scenarios Column AB and A.

Currently this formula is only working if I take out the second criteria "&(Fcst_scenarios!A:A=AT!D9)"

The data is linked to slicers hence the need for a SUMTOTAL.

Any help would be greatly appreciated!

Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Change the & to an *
Although if you are happy to use a helper column, you can use a simple sumifs
 
Upvote 0
Are you happy to use a helper column, rather than volatile functions?
 
Upvote 0
Sort of. You can put
Excel Formula:
=SUBTOTAL(3,A2)
in the first blank column on the Fcst_scenarios sheet, changing the A2 to a column that will always have data.
Then you can use something like
Excel Formula:
=SUMIFS(Fcst_scenarios!I:I,Fcst_scenarios!AB:AB,AT!C12,Fcst_scenarios!A:A,AT!D9,Fcst_scenarios!AC:AC,1)
Changing the AC to whatever column has the subtotal formula.
 
Upvote 0
Thanks for this, really sped up the workbook. My only issue now thou is that when the filters change in the fcst scenarios sheet the formula doesn't reflect the new totals?
 
Upvote 0
Which cells did you put the subtotal in & what is your current formula for the sumifs?
 
Upvote 0
current formula is SUMIFS(Fcst_scenarios!$I:$I,Fcst_scenarios!$AB:$AB,AT!$C12,Fcst_scenarios!$A:$A,AT!$D$9,Fcst_scenarios!$AS:$AS,1))

Column AS in the fcst_Scenarios sheet has the formula =SUBTOTAL(3,A2)
 
Upvote 0
That should work.
Will col A always have a value on every row?
Also how are you filtering the data?
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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