I have a code that Auto rename sheets based on text in cell which works fine (See below). However I would like the code to ignore any sheets that have already been named.
' Names each newley created tab with the scps name
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Worksheets
On Error Resume Next
If Len(ws.Range("P2")) > 0 Then
ws.Name = Replace(ws.Range("P2").Value, "/", "-")
On Error GoTo 0
If ws.Name <> Replace(ws.Range("P2").Value, "/", "-") Then
MsgBox ws.Name & " Was Not renamed, the suggested name was invalid"