|
Sub 宏1()
Dim temp, temp2
Dim i, j
j = 1
For i = 5 To 74
temp = "'G" & j & "'!A1"
temp2 = "G" & j
Range("B" & i).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=temp, TextToDisplay:="G" & j
j = j + 1
Next
End Sub
在每一个sheet的第一个单元格中创建返回sheet1的B列所对应的链接单元格。
Sub 宏2()
Dim temp, temp2, i, j
j = 1
For i = 5 To 74
temp = "sheet1!B" & i
temp2 = "G" & j
Sheets(temp2).Select
ActiveCell.FormulaR1C1 = ""
Range("A1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=temp, TextToDisplay:="返回"
j = j + 1
Next
End Sub
|
|