View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Terry Pinnell[_4_] Terry Pinnell[_4_] is offline
external usenet poster
 
Posts: 192
Default Enter column of hyperlinks

Claus Busch wrote:

Hi Terry,

Am Fri, 4 Sep 2015 10:17:55 +0200 schrieb Claus Busch:

try it with a macro:

Sub Hyp()


there is missing a backslash

Sub Hyp()
Dim LRow As Long
Dim rngC As Range
Dim myPath As String

With ActiveSheet
myPath = .Range("A1")
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In .Range("A3:A" & LRow)
.Hyperlinks.Add _
anchor:=rngC.Offset(, 1), _
Address:=myPath & "\" & rngC, _
TextToDisplay:=Left(rngC, InStr(rngC, ".") - 1)
Next
End With
End Sub


Regards
Claus B.


Hi Claus,

Thanks so much, that works perfectly!

You are truly one of my major online assets ;-)

--
Terry, East Grinstead, UK