How do i generate hyperlinks within excel

March 4, 2011 at 11:06:44
Specs: Windows 7
Greetings gurus

I have created a very large spreadsheet.

It comprises of one master worksheet and 100 subordinate sheets.
The master sheets references data from the 100 subordinate sheets from one column from each subordinate sheet.
The subordinate sheets contain 50 rows of data each.
Each of these is viewable on the master sheet at the corresponding cell effectively creating a high level view of all of the subordinate data.
Each of the subordinate sheets are named '00' to '99'
This means the master sheet is a grid of 100 columns or 50 rows.

This works great but I am wanting to make each cell on the master sheet to have a hyperlink to the subordinate sheets to the source cell but I do not want to manually program all 500 cells one by one.

Is there a macro I can use? I cannot work out how to do this.


See More: How do i generate hyperlinks within excel

Report •

March 4, 2011 at 14:13:10
I found the code I needed

Sub blah()

'Deal with the main body
Sheetcount = 1
RowCount = 13
RowEnd = 101

For Each cName In Sheets("Master Return").Range("V6:DQ56")

ActiveSheet.Hyperlinks.Add _
Anchor:=cName, Address:="", SubAddress:= _
Sheetcount & "!E" & RowCount

Sheetcount = Sheetcount + 1

If Sheetcount = RowEnd Then
Sheetcount = 1
RowCount = RowCount + 1
End If


End Sub

Report •
Related Solutions

Ask Question