|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub test0() '可多次调整组长、业绩等
- Dim ar, i As Long, wks As Worksheet, dict As Object 'New Dictionary
- Set dict = CreateObject("Scripting.Dictionary")
- For Each wks In Worksheets
- If wks.Name <> "汇总" Then dict.Add Split(wks.Name, "-")(0), wks.Name
- Next
- ar = Range("A1").CurrentRegion
- For i = 2 To UBound(ar)
- If dict.Exists(CStr(ar(i, 1))) Then
- Worksheets(dict(CStr(ar(i, 1)))).Name = ar(i, 1) & "-" & ar(i, 2) & "-" & ar(i, 3)
- End If
- Next
- Set dict = Nothing
- End Sub
复制代码 |
评分
-
2
查看全部评分
-
|