View totals whilst filtering data

richanor

Active Member
Joined
Apr 8, 2006
Messages
291
Hi

I have a sheet with around 5000 lines of data across columns A:N. Each line belongs to one of 15 geographical regions, and this is entered into column A. I have also applied a filter, so that I can just view one geographical region at a time.

Column N contains the number of units sold, and I have summed the total units sold in cell O1 using the formula =SUM(N1:N4930).

I was wondering if there is any way I can get this total to adjust when I apply a filter to column A e.g. when I select 'south' from the filter in column A - I will only see the sales for the south.

I hope I have explained this well enough, and would appreciate any advice

Thanks

Rich
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
richanor,

Search in Excel Help for SUBTOTAL.

The 109 means SUM all rows in the filtered range, and, ignore hidden rows.


Try:
=SUBTOTAL(109,N1:N4930)

or:
=SUBTOTAL(109,N2:N4930)
 
Upvote 0
One additional suggestion... it may seem counter-intuitive, but I most often find it's easier to put subtotals at the top of the page instead of the bottom. That way you don't have to move them when your data grows, and you can freeze panes so that you always see the subtotals. In that case, you could change n1:n4930 to be n3:n65536, where line 1 is the subtotal and line 2 is a blank row.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,705
Members
452,939
Latest member
WCrawford

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