View Single Post
  #2   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.