Combining SUMPRODUCT and Subtotal Functions with same criteria

corinaas

New Member
Joined
Jan 21, 2022
Messages
7
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have an existing table that uses SUMIFS of a range on another sheet and works great, but we need to add a subtotal function so it only totals the filtered data.

This is what I have so far from tutorial boards but it's returning a #NAME? error: =SUMIPRODUCT(SUBTOTAL(109,(OFFSET(DataSheet!$E:$E,DataSheet!$F:$F,TimeSheet!$A3,DataSheet!$G:$G,B$1)))).

Here is the equation that works but does not subtotal: =SUMIFS(DataSheet!$E:$E,DataSheet!$F:$F,TimeSheet!$A3,DataSheet!$G:$G,B$1)

How can I amend to both SUMIF and Subtotal the same data range and critieria?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi & welcome to MrExcel.
Rather than using sumproduct/offset, which is volatile & can be slow. I would suggest using a helper column with
Excel Formula:
=SUBTOTAL(3,A2)
Change the A2 to a column that will always have data & then you can use
Excel Formula:
=SUMIFS(DataSheet!$E:$E,DataSheet!$F:$F,TimeSheet!$A3,DataSheet!$G:$G,B$1,DataSheet!$X:$X,1)
change column X to the column with the subtotal.
 
Upvote 0
Hi & welcome to MrExcel.
Rather than using sumproduct/offset, which is volatile & can be slow. I would suggest using a helper column with
Excel Formula:
=SUBTOTAL(3,A2)
Change the A2 to a column that will always have data & then you can use
Excel Formula:
=SUMIFS(DataSheet!$E:$E,DataSheet!$F:$F,TimeSheet!$A3,DataSheet!$G:$G,B$1,DataSheet!$X:$X,1)
change column X to the column with the subtotal.
This worked swimmingly! Really appreciate your quick response and expertise!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,836
Members
449,096
Latest member
Erald

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