Sub Rename_Sheet()
Dim sh$, temp As Range, x$, tempName$
On Error Resume Next
sh = InputBox("Enter revised sheet name.")
If sh = ActiveSheet.Name Or sh = "" Then Exit Sub
Set temp = Worksheets(sh).[A1]
If temp Is Nothing Then
ActiveSheet.Name = sh
Exit Sub
Else
x = 1
If InStr(sh, " (") > 0 Then tempName = Left(sh, InStr(sh, " (") - 1)
Do
x = x + 1
If ActiveSheet.Name = tempName & " (" & x & ")" Then Exit Sub
Loop Until Evaluate("ISREF('" & tempName & " (" & x & ")'!A1)") = False
End If
If InStr(sh, " (") > 0 Then
tempName = Left(sh, InStr(sh, " (") - 1)
ActiveSheet.Name = tempName & " (" & x & ")"
Else: ActiveSheet.Name = sh
End If
End Sub