how to write an adjustable hyperlink to named cells

B

BROCK8292

im trying to write a series of hyperlinks to named cells in the same workbook
for example
hyperlink stk001 on sheet1 will link to the cell with text stk001 in sheet2
i need to do this for stk001 - stk 999 so id like to be able to copy it down
the spreadsheet and i want the hyperlinks to adjust if i add rows in to
sheet2 which is why i want them linked to a named cell
thank you for your time and assistance
barry
spokane, wa
 
D

Don Guillett

You might like this better. Almost no overhead. Right click sheet tab>view
code>copy/paste this>modify to suit>SAVE workbook. Now type in the text to
goto on the other sheet and you will be taken there to the cell containing
the text you typed in cell d2 on the original sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$D$2" Then Exit Sub
On Error GoTo notthere
Application.Goto Sheets("sheet3").Columns("c").Find(Target, lookat:=xlWhole)
Exit Sub
notthere: MsgBox "Not there"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top