Excel VBA

A macro I used to creat the hyperlinks to another sheet which is in sequence

Sub CreateLinks()

Dim i, j, NoNeeded As Integer

i = 19 'copy source start row

j = 2 'copy destination start row

NoNeeded = 500 'number of links

Dim cellSelect As String

Dim cellTarget As String
For j = 2 To NoNeeded

cellSelect = "A" & CStr(j)


cellTarget = "!A" & CStr(i)
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=_ "'UNKNOWN (1)'" & cellTarget, TextToDisplay:="'UNKNOWN (1)'" & cellTarget

i = i + 1

Next j

End Sub


Popular posts from this blog

Clearcase check in/uncheck out all the checked out files script

Duplicating a local copy of project from TFS and making web software client factory to work