View Single Post
  #2   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, 04 Sep 2015 07:54:33 +0100 schrieb Terry Pinnell:

I have a sheet like this:
https://dl.dropboxusercontent.com/u/...inkEntry-1.jpg
I've pasted in the entire column A of over a hundred filenames.


So the result would look like this:
https://dl.dropboxusercontent.com/u/...inkEntry-2.jpg
I've struggled with automating this for an hour or so, but in vain,
and would much appreciate some help please.


try it with a macro:

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