Subtotal and Sumif combination help

Sourkraut

New Member
Joined
Jun 19, 2009
Messages
35
Alright, I need help combining two formulas.

What we need is to subtotal a range based on a criteria and we need that subtotal to change when the range is filtered.

We have two formulas that work seperately but we need to combine them into one.

=SUBTOTAL(9,Summary!H3:H39)

=SUMIF(Summary!F3:F39,B35,Summary!H3:H39)

B35 = The name we're trying reference
Column F is the column that would hold that name
Column H has the values we want to sum
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Alright, I need help combining two formulas.

What we need is to subtotal a range based on a criteria and we need that subtotal to change when the range is filtered.

We have two formulas that work seperately but we need to combine them into one.

=SUBTOTAL(9,Summary!H3:H39)

=SUMIF(Summary!F3:F39,B35,Summary!H3:H39)

B35 = The name we're trying reference
Column F is the column that would hold that name
Column H has the values we want to sum


I am trying to do something similar. I was using the formula provided by barry houdini to get a subtotal with the sumif.

However, now I need to do the same but only for transactions that are past due (criteria would be before / less than a specified date, today() )

Here is what I need combined:

=SUBTOTAL(9,J11:J500)

=SUMIF(K11:K241,"<"&N2,J11:J241)
the above could also be written as =SUMIF(K11:K241,"<"&today(),J11:J241)

Thank you!
 
Upvote 0
I am trying to do something similar. I was using the formula provided by barry houdini to get a subtotal with the sumif.

However, now I need to do the same but only for transactions that are past due (criteria would be before / less than a specified date, today() )

Here is what I need combined:

=SUBTOTAL(9,J11:J500)

=SUMIF(K11:K241,"<"&N2,J11:J241)
the above could also be written as =SUMIF(K11:K241,"<"&today(),J11:J241)

Thank you!

Are you after this?

=SUMPRODUCT(SUBTOTAL(9,OFFSET(J11,ROW(J11:J241)-ROW(J11),0,1)),--(K11:K241 < TODAY()))
 
Upvote 0
Sorry I got the ranges the wrong way round, this should fix it.....

=SUMPRODUCT(SUBTOTAL(9,OFFSET(Summary!H3,ROW(Summary!H3:H39)-ROW(Summary!H3),0)),(Summary!F3:F39=B35)+0)

Awesome! Wish I understood it better though. I read the descriptions off all the codes, just got lost. But this did work.
If it's this "easy" to create a formula that does it, why can't it just be found under 'Subtotal?'
 
Upvote 0
hi..i need help with this formula :

Capture.jpg
[/URL][/IMG]

i need to combine these two formula :
- SUMIF($B$2:$B$17,$B21,$C$2:$C$17)
- SUBTOTAL(9,$C$2:$C$17)

thx before
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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