vba:sheet批量改名

Sub 改名1()

Dim x As Integer, sht As Worksheet
x = 1

For Each sht In Worksheets
If sht.Name <> "汇总" And sht.Name <> "11" Then
sht.Name = Left(Sheets("11").Cells(x, 1).Value, Len(Sheets("11").Cells(x, 1).Value) - 5)
x = x + 1
End If
Next

End Sub

原文地址:https://www.cnblogs.com/yukit/p/14060865.html