- Oct 6, 2010
- Office Version
I’m using the following macro to create additional worksheets with a set naming standard. I want to revise the macro to create worksheets using the following date format. The first worksheet name will be called 7-2-12. The next worksheet should be called 7-9-12, 7-16-12, etc. The first part of the macro works, just not sure how to adjust the line of code that starts with “Sheets"
</SPAN></SPAN> Sub NameSheetsByWeekDay() Dim i As Integer, j As Integer Application.ScreenUpdating = False For i = 1 To 8 For j = 1 To 5 If i > 1 And j > 1 Then Sheets("WK1 DY1").Copy after:=Worksheets(Worksheets.Count) ActiveSheet.Name = "WK" & i & " DY" & j If i > 1 And j = 5 Then Sheets("Week1 Summary").Copy after:=Worksheets(Worksheets.Count) ActiveSheet.Name = "Week" & i & " Summary" End If End If Next j Next i Application.ScreenUpdating = True End Sub