MrExcel's Learn Excel #667 - Totaling Visible Rows

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Feb 20, 2009.
Mustafa asks a question of how to see the totals from only the visible rows in a filtered data set. There is an easy way to do this, but it is not completely obvious. Episode 667 shows you how.

This blog is the video podcast companion to the book, Learn Excel 97-2007 from MrExcel. Download a new two minute video every workday to learn one of the 377 tips from the book!
maxresdefault.jpg


Transcript of the video:
Welome back to the MrExcel netcast. I'm Bill Jelen.
Today we have a question sent in by Mustafa. Mustafa's in Washington.
He had some public transit data and had a great question.
I just have a regular data set here that I'm going to use this on.
You know basically he said. I used the autosum button, I put the totals down at the bottom but then I go through and I'll use the "Autofilter" "Data" "Filter" "Autofilter", and I'll choose a specific row or something like that here I'll just choose a customer and he's frustrated that the totals, first of all, disappear.
And he wants to figure out how you get a running total of just the filtered rows. Well, this is pretty cool.
I'm going to turn off the filter first. "Data" "Filter" turn off the "Autofilter".
Basically here's what we have to do.
Don't add those totals before you apply the filter.
You have to turn on the filter first.
So we'll go up to "Data" "Filter" "Autofilter" and then you have to apply a filter to one column otherwise the trick doesn't work.
So I'll go here and I'll choose one of the customers, will go to the last row that's visible beneath our data and now apply the "Autosum" button.
Normally the autosum button gives us a SUM formula, but here you'll see in the formula bar that is giving us a special formula.
SUBTOTAL formula at the number 9 he is asking for a total.
And the beautiful thing about this is that we get our totals down below the data.
You'll see that Boeing has 71,000.
If I choose a different customer.
Compaq for example, I change to 39,000.
Now to really make this trick work very very well, the thing I don't like about it, is sometimes if we choose a customer, who has many many records, the totals get lost. So what I'd like to do is after I've applied those totals, I'll insert a couple of new rows at the top of the worksheet, up above where the the panes are frozen.
we'll put the word "Total" up here and I'll take those live totals from the bottom and I'm going to not copy them, I'm going to cut them with "Edit" cut or Ctrl x.
Now paste those up in row 1 and now, basically we've allowed the excel autosum to build a great formula for us.
However, this formula now will always show at the top of our worksheet.
The total of all the filtered rows.
Something that's very easy to do but not obvious at all. The fact that you have to apply the filter first in order to make this great trick work.
So I want to thank Mustafa for sending this question in.
And I want to thank you for stopping by. Will see you next time for another netcast from MrExcel.
 

Forum statistics

Threads
1,215,059
Messages
6,122,916
Members
449,093
Latest member
dbomb1414

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