Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Sums, Filters and Events oh my!

Okay fo starters I may very well be making this harder then it needs to
be.

My overall goal is to sum up 4 columns and have that sum change and
reflect the use of filters.
Unfortunately I had no luck finding a way to have the Sum function
ignore rows that were filtered out.

So I wrote a little VB script that does this for me.
What I would really like to do now is link that VB script to a 'filter
event', so when you change the filter, the totals automatically update.

There doesn't seem to be a filter event.

I am sure once again I am missing something obvious.

Thanks in advance for what I am sure will be a number of useful replies.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sums, Filters and Events oh my!

Your missing the subtotal worksheet function which will do what you want
without events or code.

=subtotal(9,A1:A200)

the first argument defines the math operation to perform. 9 is sum, 3 is
count as examples. See Help in excel for details.

--
Regards,
Tom Ogilvy


"Merlin" wrote:

Okay fo starters I may very well be making this harder then it needs to
be.

My overall goal is to sum up 4 columns and have that sum change and
reflect the use of filters.
Unfortunately I had no luck finding a way to have the Sum function
ignore rows that were filtered out.

So I wrote a little VB script that does this for me.
What I would really like to do now is link that VB script to a 'filter
event', so when you change the filter, the totals automatically update.

There doesn't seem to be a filter event.

I am sure once again I am missing something obvious.

Thanks in advance for what I am sure will be a number of useful replies.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Sums, Filters and Events oh my!

Yep, that is what I needed, I knew I had to be missing something
obvious. Thanks a bunch.

Tom Ogilvy wrote:
Your missing the subtotal worksheet function which will do what you want
without events or code.

=subtotal(9,A1:A200)

the first argument defines the math operation to perform. 9 is sum, 3 is
count as examples. See Help in excel for details.

--
Regards,
Tom Ogilvy


"Merlin" wrote:

Okay fo starters I may very well be making this harder then it needs to
be.

My overall goal is to sum up 4 columns and have that sum change and
reflect the use of filters.
Unfortunately I had no luck finding a way to have the Sum function
ignore rows that were filtered out.

So I wrote a little VB script that does this for me.
What I would really like to do now is link that VB script to a 'filter
event', so when you change the filter, the totals automatically update.

There doesn't seem to be a filter event.

I am sure once again I am missing something obvious.

Thanks in advance for what I am sure will be a number of useful replies.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use "OR" in two auto-filters/custom filters? Roady Excel Discussion (Misc queries) 1 May 24th 10 06:11 PM
Pivot Table filters, especially DATE filters chris Excel Worksheet Functions 0 August 27th 08 04:33 AM
How to add previous sums in a column to current sums in a column? TD Excel Worksheet Functions 1 September 30th 06 02:55 PM
do events? background events cereldine[_15_] Excel Programming 1 April 12th 06 01:06 PM
Filters, Subtotal & Intacted Results after the filters' Removal kasiopi Excel Discussion (Misc queries) 5 February 24th 06 12:18 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"