Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 192
Default Enter column of hyperlinks

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.

In col B I want to automate the entry of their hyperlinks.

They are all from a single Explorer folder whose path is in A1. The
text is just the filename (preferably without the extension, but
that's unimportant.)

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.

--
Terry, East Grinstead, UK

  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
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
  #4   Report Post  
Posted to microsoft.public.excel.misc
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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Enter column of hyperlinks

Hi Terry,

Am Fri, 04 Sep 2015 10:48:12 +0100 schrieb Terry Pinnell:

Thanks so much, that works perfectly!

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


you are welcome. Always glad to help.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding a column of hyperlinks behind a column of numbers cmiling New Users to Excel 2 November 20th 09 05:02 PM
Macro to select cells in column enter data then press enter NP New Users to Excel 1 February 20th 08 04:21 PM
macro column lookup enter data in another column same row mikeolson Excel Programming 12 November 19th 07 05:29 PM
enter date in column a and amount in column d George A. Yorks Excel Discussion (Misc queries) 3 January 20th 07 09:04 PM
Enter date in column L if value is entered in column B Mikus Excel Programming 1 September 3rd 05 10:20 PM


All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"