Formula to build hyperlink?

S

Sisilla

Hello All,

I'd like to add hyperlinks to each row of the first column of my
worksheet using the value of each cell in the column to build the
hyperlink. The For Loop below iterates too slowly.

For Counter = 1 To LastRow
Sheets("Application").Hyperlinks.Add
Anchor:=Sheets("Application").Cells(Counter, 1), Address:= _
"http://ptt0002/Lists/Maintenance Work Orders/
DispForm.aspx?ID=" & Sheets("Application").Cells(Counter, 1).Value &
"&Source=http%3A%2F%2Fptt0002%2FLists%2FMaintenance%2520Work%2520Orders
%2FAllItems%2Easpx"
Next Counter

Is there a faster way to do this, perhaps using a formula? I greatly
appreciate any effort to help me. Thank you for your time and
consideration.

Sincerely,

Sisilla
 
D

Don Guillett

From a post of mine yesterday. This could be changed to a doubleclick event
and then use
if target.column<>1 then exit sub

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