|
发表于 2015-7-31 11:39
|
显示全部楼层
本楼为最佳答案
本帖最后由 hysys32 于 2015-7-31 11:40 编辑
并没有杭州这个表 删掉后 可以试试这段代码
Sub 宏1()
arr = Sheets("总表").Range("a1:b20").Value
For i = 2 To UBound(arr)
Sheets(arr(i, 2)).Move before:=Sheets(i)
Next
addhuperlink
End Sub
Sub addhuperlink()
Sheets("总表").Select
For i = 2 To Sheets("总表").[b2:b20].Count + 1
Cells(i, 2).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
Cells(i, 2).Value & "!A1", TextToDisplay:=Cells(i, 2).Value
Next
End Sub
|
评分
-
查看全部评分
|