Transforming a col of text strings to hyperlinks

  • Thread starter Thread starter Kreller
  • Start date Start date
K

Kreller

I have a column with various internet hyperlinks. However for som
reason they are stored in the column as ordinary text strings. Is ther
a way of transforming all the strings to hyperlinks
 
Kreller

Manually..........select the column of strings then in active cell hit F2 and
ENTER.

Just keep F2'ing and ENTER'ing until you reach the bottom.

VBA code from David McRitchie.......

Sub MakeHyperlinks()
'David McRitchie
Dim Cell As Range
For Each Cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
With Worksheets(1)
.Hyperlinks.Add Anchor:=Cell, _
Address:=Cell.Value, _
ScreenTip:=Cell.Value, _
TextToDisplay:=Cell.Value
End With
Next Cell
End Sub

Gord Dibben Excel MVP
 

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

Back
Top