View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Enter column of hyperlinks

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.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional