Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
consolidation of tables in excel with text and figures | Excel Worksheet Functions | |||
Copy from WORD to EXCEL using a macro..... | Excel Discussion (Misc queries) | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) | Excel Discussion (Misc queries) |