Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Subtotal Macro Through Numerous Tabs

I'm looking for a macro that will subtotal data on each tab in a worksheet
that has many tabs - and which the number of tabs fluctuates. Basically:

(unsorted source data in sheet1, data sorted by account # on each tab
starting in sheet2)

Subtotal at change in column B; Sum columns A - K for sheet2, then again on
sheet3, and so on until there are no more tabs.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Subtotal Macro Through Numerous Tabs

Sub sumworksheets()

Subtotal = 0

For Each ws In Worksheets

If ws.Name < "Sheet1" Then

Subtotal = Subtotal + WorksheetFunction.Sum(Range("A1:B21"))

End If

Next ws


End Sub


"masterbaker" wrote:

I'm looking for a macro that will subtotal data on each tab in a worksheet
that has many tabs - and which the number of tabs fluctuates. Basically:

(unsorted source data in sheet1, data sorted by account # on each tab
starting in sheet2)

Subtotal at change in column B; Sum columns A - K for sheet2, then again on
sheet3, and so on until there are no more tabs.

Thanks!

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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
sort macro, subtotal and add lines after subtotal David Excel Discussion (Misc queries) 1 August 29th 09 10:56 AM
macro excel subtotal in subtotal GBO Excel Discussion (Misc queries) 2 November 29th 07 02:15 PM
Average percentage excluding zeros spanning numerous tabs Willabo Excel Discussion (Misc queries) 5 July 31st 06 04:02 PM
Numerous OR criteria in a Filtered Macro Andy Wilkinson Excel Programming 3 May 4th 05 07:07 PM


All times are GMT +1. The time now is 12:41 PM.

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

About Us

"It's about Microsoft Excel"