Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jannkatt
 
Posts: n/a
Default group sheets with macro in excel

Is there a way to easily group worksheets in excel using a macro so that some
function can be performed on all sheets at the same time? I have over 100
sheets and currently have to list each sheet in the macro. This is time
consuming since the sheet names change every year.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default group sheets with macro in excel

Worksheets(Array("Sheet1", "Sheet2")).Select


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"jannkatt" wrote in message
...
Is there a way to easily group worksheets in excel using a macro so that

some
function can be performed on all sheets at the same time? I have over 100
sheets and currently have to list each sheet in the macro. This is time
consuming since the sheet names change every year.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default group sheets with macro in excel

You may use the Worksheets collection, and loop through it. Something like:

Dim wksPage As Worksheet
For Each wksPage In ActiveWorkbook.Worksheets
'Here you can do whatever you need with the wksPage object
Next

Hope this helps,
Miguel.

"jannkatt" wrote:

Is there a way to easily group worksheets in excel using a macro so that some
function can be performed on all sheets at the same time? I have over 100
sheets and currently have to list each sheet in the macro. This is time
consuming since the sheet names change every year.

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
consolidation of tables in excel with text and figures samenvoegen van sheets Excel Worksheet Functions 8 March 2nd 06 03:27 PM
Copy from WORD to EXCEL using a macro..... Tee Excel Discussion (Misc queries) 1 March 1st 06 06:46 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM


All times are GMT +1. The time now is 10:56 PM.

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"