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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Aladin could you tell me when we use Vlookup to replace nest if formula &also give some example?
thanks

Whenever you want to look up something...

Suppose you want to know the phone number of mister Ford and there is data which consists of records containing names like Ford and the phone numbers associated with these names like:

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][/tr][tr][td]
1​
[/td][td]CODE[/td][td]NAME[/td][td]SCORE[/td][td]PHONE[/td][td]ASSOCIATION[/td][/tr]
[tr][td]
2​
[/td][td]dax[/td][td]friedman[/td][td]
23​
[/td][td]23-3456[/td][td]king's college[/td][/tr]
[tr][td]
3​
[/td][td]zax[/td][td]ford[/td][td]
35​
[/td][td]23-2346[/td][td]london school of economics[/td][/tr]
[tr][td]
4​
[/td][td]nax[/td][td]buffett[/td][td]
90​
[/td][td]24-7721[/td][td]koç university[/td][/tr]
[tr][td]
5​
[/td][td]wax[/td][td]jobs[/td][td]
88​
[/td][td]25-4400[/td][td]apple[/td][/tr]
[/table]


Suppose we have Ford in H2, the name we want to look up for his phone number:

In I2 we would enter a look up formula like...

(a)

=VLOOKUP(H2,B:D,3,0)

(b)

=VLOOKUP(H2,B:D,MATCH("phone",INDEX(B:D,1,0),0),0)

(c)

=INDEX(D:D,MATCH(H2,B:B,0))
 
Upvote 0
Hello, I want a subtotal that will find a criteria in column D and return the sum of values from Column J. So if the criteria is repeated 6 times in column D then return the sum of those 6 rows from column J. Completely at a loss with this one. Can anyone help me please?
 
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)
Hi, thank you for this formula! What is the purpose of the +0 at the end? I can't find anything about it but my application doesn't work without it. Thank you very much!
 
Upvote 0
Hi, thank you for this formula! What is the purpose of the +0 at the end? I can't find anything about it but my application doesn't work without it. Thank you very much!
Any arithmetic operation in XL coerces text to numbers
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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