Can I hyperlink all cells from Sheet1 to the same cells from Sheet2?
I mean, if I press on cell C1 from Sheet1 to redirect me to cell C1 from sheet2 and so on.
I have like 8000 cells and do it manually will take me years so I'm wondering if there is a faster way to achieve this. Thank you!
CodePudding user response:
You can use macro:
Sub makelinks()
Dim c As Range
For Each c In Selection
If Len(c.value) > 3 Then ActiveSheet.Hyperlinks.Add anchor:=c, _
Address:="", SubAddress:="Sheet2!" & c.Address
Next
End Sub
Select the cells you want to be linked and run the macro (Alt-F8). The code should be pasted in Module1 in your visual basic viewer (Alt-F11).
The If Len(c.value) > 3
is something that's been handy for me, it can be removed if it does not fit your purpose, it just ignores certain cells that has less than 3 characters