hi everyone,
I have the following code I found online which seems to do what essentially need it to do with a couple of small adjustments:
Sub Apply_Hyperlinks()
Dim intCount As Integer
Dim rngRange As Range
Dim strTMP As String
For Each rngRange In Selection
If Trim(rngRange.Value) <> "" Then
strTMP = rngRange.Text
intCount = Application.Find("http://", strTMP, 1)
rngRange.Hyperlinks.Add Anchor:=Cells(rngRange.Row, rngRange.Column), Address:=Mid(strTMP, intCount), ScreenTip:=Mid(strTMP, intCount), TextToDisplay:=Left(strTMP, intCount - 1)
End If
Next rngRange
End Sub
What I'm trying to do is have this code automatically applied to cell ranges K1:K3000 and M1:M3000. I've tried a dozen variations and it keep getting an error code 13 each time on the intCount=Application line. Any ideas?
Thanks very much for your help.
Bookmarks