I 'm using the below code to copy a hidden sheet and rename it. It works fine if there is only one hidden sheet but i will have up to 20 hidden sheets. Any help will be appreciated.
Thanks for the help!
Code:
Sub AutoAddSheet()
Application.ScreenUpdating = False
Dim LastRow As Long, MyCell As Range
LastRow = Sheets("Info Entry").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For Each MyCell In Sheets("Info Entry").Range("N26:N" & LastRow)
Sheets(MyCell.Value).Visible = True
Sheets(MyCell.Value).Copy After:=Sheets(Sheets.Count) 'Create a new worksheet as a copy of Sheet number
Sheets(Sheets.Count).Name = MyCell.Offset(0, -13).Value 'Renames the new worksheets
Sheets(MyCell.Value).Visible = False
Next MyCell
Worksheets("Info Entry").Activate
Application.ScreenUpdating = True
End Sub
Thanks for the help!
Last edited by a moderator: