View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Wright Ken Wright is offline
external usenet poster
 
Posts: 634
Default Using VBA, subtotal a column only if there is more than one qualifier

The other thing you might consider depending on your data, is a Pivot Table. Probably one of the
most flexible and powerful tools Excel has, yet so simple to use. Debra Dalgleish has a good
intro at the following link:-

http://www.geocities.com/jonpeltier/...pivotstart.htm

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

----------------------------------------------------------------------------
There's no 'I' in 'Team'
----------------------------------------------------------------------------



"Ken Wright" wrote in message
...
Slight redundancy yes, but the flexibility you will get through using Data / Subtotals will far
outweigh any perception of redundancy. You can expand contract levels at the click of a button,
and are able to copy just summary tables if you wish, using Edit / Go To / Special / Visible

cells
only once you have a summary view.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

----------------------------------------------------------------------------
There's no 'I' in 'Team'
----------------------------------------------------------------------------



"Joanne" wrote in message
om...
I need to do a subtotal for a very large spreadsheet, but I don't want
to subtotal the numbers when there is only one qualifier since it is a
little redundant. Essentially a summarized version of my spreadsheet
is:
A B
101 25
101 27
101 89
201 45
301 96
301 37

What I want the macro to do is; subtotal Column B for every change in
column A except when Column A only has one qualifier, therefore the
final spreadsheet should look something like this:
A B
101 25
101 27
101 89
Sum 101 141
201 45
301 96
301 37
Sum 301 133
Any help would be very appreciated and Thank-you in advace.
Joanne