Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create a work book containing 52 sheets, with the first being named week 1, then week 2 and so on. How can I do this without renaming each sheet manually.


share|improve this question

I don't see any restrictions on how to achieve this, so I've used VBA code:

Sub btnClick()
    Dim counter As Integer
    counter = 1
    For Each ws In ActiveWorkbook.Worksheets
        ws.Name = "Week" & counter
        counter = counter + 1
    Do While counter < 53
        Worksheets.Add().Name = "Week" & counter
        counter = counter + 1
End Sub

What this does is renaming the existing worksheets: so if you use a new workbook, you will have 3 worksheets and those will be renamed to week1, week2 and week3. When the existing worksheets are renamed, the code will generate new worksheets and name them "week" with the number of the worksheet.

If you have any more features or trouble with this solution, feel free to comment.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.