PDA

View Full Version : Subtotals



davidws
2011-12-18, 07:29 PM
If I have a list of values that are subtotaled by a certain category, is there an easy way for a user to quickly choose to include or exclude certain components from the total? Example:


Sold 3
Sold 4
Subtotal Sold = 7


Unsold 6
Unsold 7
Subtotal Unsold = 13


Grand total = 20


What if I want to set this up so that the user can choose to include or exclude the Sold subtotal in the grand total?

Jesse
2011-12-19, 06:59 PM
If you set an autofilter on the data and put the totals above them using the =SUBTOTAL() function then when you filter the table the totals will only include the visible values.

I've attached a primitive example. You could further simplify this by recording some simple macros for the key values you want and assigning them to buttons. When you filter any of the fields, the totals above update.

403

Jesse