Filter Sum question

TMILJVIPM

Board Regular
Joined
Aug 6, 2011
Messages
72
What I need to do is only show the total in the cells I have when I filter a specific item. Here's what I have:

Cell R9 is for total manhours for all projects and the formula I have in it is =sum(R15:R104) so when I filter a certain project number I only want the totals for that specific project to show in cell R9. Now I have multiple cells that total different data but they all have the same formula.

Now 1 total cell which is W9 has formula =average(Y15:Y104).

I hope I explained properly
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
What does that mean exactly? Aren't you applying AutoFilter?

=SUBTOTAL(9,SumRange)

would sum the range to sum while AutoFilter is applied.

Im not sure if im explaining properly. Let me try to explain some more.

Cell B15 thru B104 has project #'s ex 100111
Cell R15:R104 Has manhours
Cell R9 has Total manhours for all project #'s with the formula =sum(R15:R104)

But lets say I filter project # 100154 which would be in cell B74 I want cell R9 to pull the manhours for only project #100154. Right now my sheet still pulls all manhours for all jobs when I only filter specific project number.
 
Upvote 0
What does that mean exactly? Aren't you applying AutoFilter?

=SUBTOTAL(9,SumRange)

would sum the range to sum while AutoFilter is applied.

Never mind I got it. Duh I should have seen it. Some times things are so simple and yet they become so complicated looking for more complex answers.

Thanks for the patience
 
Upvote 0
Im not sure if im explaining properly. Let me try to explain some more.

Cell B15 thru B104 has project #'s ex 100111
Cell R15:R104 Has manhours
Cell R9 has Total manhours for all project #'s with the formula =sum(R15:R104)

But lets say I filter project # 100154 which would be in cell B74 I want cell R9 to pull the manhours for only project #100154. Right now my sheet still pulls all manhours for all jobs when I only filter specific project number.

In R9 enter:

=SUBTOTAL(9,R15:R104)

would be equivalent to:

=SUMIF(B15:B104,100154,R15:R104)

When the filter is removed...

=SUBTOTAL(9,R15:R104)

would be equivalent to:

=SUM(R15:R104)
 
Upvote 0
In R9 enter:

=SUBTOTAL(9,R15:R104)

would be equivalent to:

=SUMIF(B15:B104,100154,R15:R104)

When the filter is removed...

=SUBTOTAL(9,R15:R104)

would be equivalent to:

=SUM(R15:R104)

OK I did run into 1 problem cell W9 has the formula =average(Y15:Y104)
so how would I handle this formula?
 
Upvote 0
Hi there try aggregate function if your using 2010 version. This function has the ability work on data that will ignore hidden rows. You can try sum,count, max, average etc..lots of function aggregated to one.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,553
Members
452,928
Latest member
101blockchains

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