1

I have 339 sheets called Matrix1, Matrix2, Matrix3,..., up to Matrix 339 and for each of those sheets I need to create a hyperlink in cell A2 that takes me to a specific sheet called Index (it doesn't matter in which cell ). I also need cell A2 for each of the Matrix worksheets to have the corresponding number. For example, if I am in the Matrix20 sheet, cell A2 has the corresponding number 20 as its name and would have the hyperlink to the Index sheet. So consecutively for the other matrix sheets.

My code so far is this one:

Sub Hyperlink()
For i = 1 To 339
Worksheets("Matrix" & i).Cells(2, 1) = "=HYPERLINK(""[Workbook.xlsx]Index!A1"",i)"
Next
End Sub

But is not working. I don't know why. Thanks in advance for the answers.

Mayukh Bhattacharya
  • 12,541
  • 5
  • 21
  • 32

0 Answers0