ub copysheets()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim c As Range
Dim i As Long, n As Long
Application.ScreenUpdating = True
Set sh1 = Sheets("Sheet1") 'fit with the name of sheet with sheet names
n = Sheets.Count
ReDim b(1 To n, 1 To 2)
For i = 1 To n
b(i, 1) = Sheets(i).Name
b(i, 2) = Sheets(i).Visible
Sheets(i).Visible = -1
Next
For Each c In sh1.Range("B7:B27")
If c.Value <> "" And c.Offset(0, -1).Value <> "" Then
If Evaluate("ISREF('" & c.Value & "'!A1)") Then
If Not Evaluate("ISREF('" & c.Offset(0, -1).Value & "'!A1)") Then
Sheets(c.Value).Copy after:=Sheets(Sheets.Count)
ActiveSheet.Name = c.Offset(0, -1).Value
End If
End If
End If
Next
For i = 1 To n
Sheets(b(i, 1)).Visible = b(i, 2)
Next
Application.ScreenUpdating = True
End Sub