MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Hyperlink Macro Help!!

Posted by Rich Baxter on November 12, 2001 9:44 AM

I am trying to create a macro that will move the cursor to the next cell to the right and make it into a hyperlink like this:

That's easy of course, but each time I run the macro, I want the last figure on the link to jump up by 1, so the next one would read:

The cells themselves just read the last figure, so the first is "1", second is "2" etc....
Any help would be greatly appreciated!


Posted by faster on November 12, 2001 10:06 AM

Sub LinkCell()
'if H1 is not blank change code to a blank cell
'just use a blank cell to hold the value of the next "jump"
Range("H1") = Range("H1") + 1

ActiveSheet.Hyperlinks.Add Anchor:=Selection.Offset(0, 1), _
Address:="" & Range("h1"), _
End Sub