Thread
:
Activating hyperlinks
View Single Post
#
2
Posted to microsoft.public.excel.misc
Claus Busch
external usenet poster
Posts: 3,872
Activating hyperlinks
hi,
Am Tue, 17 Jun 2014 14:40:54 -0400 schrieb
:
In Excel 2010, I have a range of cells into which I have copied and
pasted URLs. They all pasted as text and I want them to be active
hyperlinks.
try (if your strings are not in column A then modify the code):
Sub ActivateHyperlinks()
Dim rngC As Range
Dim LRow As Long
With ActiveSheet
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In .Range("A1:A" & LRow)
.Hyperlinks.Add _
anchor:=rngC, _
Address:=IIf(Left(rngC.Text, 4) < "http", _
"http://" & rngC.Text, rngC.Text)
Next
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch