Convert text to hyperlink

R

Ryer

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

I have about 63000 lines that need converted!
 
F

FSt1

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
 
G

Gord Dibben

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
 

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