Convert text to hyperlink

  • Thread starter Thread starter Ryer
  • Start date Start date
R

Ryer

How do I convert a text string to a hyperlink in an
Excel Spreadsheet?

I have about 63000 lines that need converted!
 
hi
this might work for you...
Sub AddHyperlinks()
Dim hl As Range
Dim r As Range
Dim lr As Long
lr = Cells(Rows.Count, "B").End(xlUp).Row 'change column if needed
Set r = Range("B2:B" & lr) 'change to suit your data
For Each hl In r
ActiveSheet.Hyperlinks.Add anchor:=hl, Address:= _
hl.Value, TextToDisplay:=hl.Value
Next hl
End Sub

regards
FSt1
 
What type of text string?

This may work if the links would be valid like URL's or email addresses.

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 MS Excel MVP
 
Back
Top