ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automated Hyperlink format? (https://www.excelbanter.com/excel-discussion-misc-queries/98077-automated-hyperlink-format.html)

ParkwayBunny

Automated Hyperlink format?
 
Is there a macro out there that can automatically format a column of file
names into hyperlinks? I have to do about 600 of them and if I have to do
them individually I may scream. There has to be a way!

I hope.

Thank you.
--
Have something you don''t need? Check out Freecycle at www.freecycle.org

jetted

Automated Hyperlink format?
 

You may want to have a look at this

Sub create_hyperlink()
'assuming data is in column A
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount

Range("A" & i).Select
'addr = ActiveCell.Address

original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:="'" & ActiveCell.Value
'& addr

Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=559427


ParkwayBunny

Automated Hyperlink format?
 
Thank you!!! It worked like a charm!

You saved me hours of work - I really appreciate it!

You have done your good deed for the day.

--
Have something you don''''t need? Check out Freecycle at www.freecycle.org


"jetted" wrote:


You may want to have a look at this

Sub create_hyperlink()
'assuming data is in column A
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount

Range("A" & i).Select
'addr = ActiveCell.Address

original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:="'" & ActiveCell.Value
'& addr

Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=559427



ParkwayBunny

Automated Hyperlink format?
 
Actually... I have a little problem. When I use the macro to create the
hyperinks, it takes part of the link address from the location of the
spreadsheet. I have the documents to be linked on a CD in my D drive. Is
there a way I can tell the macro not to add in the extraneous information?

Thanks!

--
Have something you don''''t need? Check out Freecycle at www.freecycle.org


"jetted" wrote:


You may want to have a look at this

Sub create_hyperlink()
'assuming data is in column A
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount

Range("A" & i).Select
'addr = ActiveCell.Address

original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:="'" & ActiveCell.Value
'& addr

Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=559427



ParkwayBunny

Automated Hyperlink format?
 
Never mind!! I figured it out! My brain cells have not left me completely.
--
Have something you don''''t need? Check out Freecycle at www.freecycle.org


"jetted" wrote:


You may want to have a look at this

Sub create_hyperlink()
'assuming data is in column A
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount

Range("A" & i).Select
'addr = ActiveCell.Address

original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:="'" & ActiveCell.Value
'& addr

Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=559427




All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com