Excel Macro: Rename all Worksheets

Solved/Closed
Bobo - 9 Jul 2010 à 10:44
 ansvk1 - 4 Sep 2013 à 08:54
So, I'm trying to figure out a way to rename all the worksheets in a workbook.

the first worksheet would be "1" (without the quotation marks) and continue up for each worksheet, so the second worksheet would be 2, the third worksheet 3, etc.

any help will be much appreciated.
thanks
Related:

2 responses

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
9 Jul 2010 à 16:50
Sub renameSheets()
Dim iSheetCount

    For iSheetCount = 1 To Sheets.Count
        Sheets(iSheetCount).Name = iSheetCount
    Next iSheetCount

End Sub
Thanks a bunch!
Many many thanks to you, good job, it was very helpful to me. Thank you again. :)
Sunil Jangir
3 Nov 2011 à 06:30
awesome!
awesome
great! can you tell me how to have this new name in the formate of FiscalWeek 1,2,3,4...so on till FW32?