Dim ws As Worksheets
For Each ws In Worksheets
For z = 2 to 26
If ws.Name <> "Template" And "Rota" Then
ws.Name = Cells(1, z)
End If
Next
Next
The red is the offending line. All I'm trying to do is rename each worksheet after each cell in B1:Z1 (There is the same no. Of...