Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Rename Multiple Sheets
Is there a way to create a macro that will rename one
sheet in a workbook, go to the next sheet, rename that sheet and continue to the last sheet in the workbook? I want the sheet name to match the formated date output of a cell on each respective sheet. I want to copy the formated date displayed in cell G3, paste it as the sheet name and then have the macro move to the next sheet and do the same thing using cell G3 on that sheet. I have done this manually with the date format being 01-Jan-04 which is fine. I have 52 sheets, one for each week of the year and doing this manually is time consuming. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Rename Multiple Sheets
Alan,
Here's some code For i = 1 To Worksheets.Count Worksheets(i).Name = Format(Worksheets(i).Range("G3").Value, "dd-mmm-yy") Next i -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Alan" wrote in message ... Is there a way to create a macro that will rename one sheet in a workbook, go to the next sheet, rename that sheet and continue to the last sheet in the workbook? I want the sheet name to match the formated date output of a cell on each respective sheet. I want to copy the formated date displayed in cell G3, paste it as the sheet name and then have the macro move to the next sheet and do the same thing using cell G3 on that sheet. I have done this manually with the date format being 01-Jan-04 which is fine. I have 52 sheets, one for each week of the year and doing this manually is time consuming. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rename of sheets by macro | Excel Discussion (Misc queries) | |||
Macro To Delete/Add & Rename/Arrange Sheets | Excel Discussion (Misc queries) | |||
TO RENAME & COLOR THE SHEETS | Excel Discussion (Misc queries) | |||
How do I rename multiple sheets at one time in Excel? | Excel Worksheet Functions | |||
Add Sheets and rename | Excel Discussion (Misc queries) |