+ Reply to Thread
Results 1 to 10 of 10

Automated Hyperlink format?

  1. #1
    ParkwayBunny
    Guest

    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

  2. #2
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363
    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

  3. #3
    ParkwayBunny
    Guest

    Re: 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
    >
    >


  4. #4
    ParkwayBunny
    Guest

    Re: 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
    >
    >


  5. #5
    ParkwayBunny
    Guest

    Re: 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
    >
    >


  6. #6
    Registered User
    Join Date
    08-06-2007
    Posts
    1

    And what's about Notes links ?

    I've the same problem, but instead of http:// links I've to solve Notes:// links but they have to be into []
    The formula of hyperlink is
    =HYPERLINK("[Notes://ServerName/Database/Document]")
    (ex: =HYPERLINK("[Notes://D12DBL35/C1256F1F002E83BE/4F6DE2D8A32044C485256A2D006A5832/F538DE3A23BA59C8C12572CA003433AE]")
    But using the above method, I don't know how to add these extra characters [ and ] before Notes and after the Document reference

  7. #7
    Registered User
    Join Date
    03-25-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    0

    Re: Automated Hyperlink format?

    I'm trying to update the hyperlinks in a sheet. I had 4 sheets of data which I combined into one. I need to update all hyperlinks i created with the new cell numbers on the same sheet. Sheet 1 had hyperlinks to sheet 3 and 4. After combining the sheets, I have all the data in one sheet. Not only the sheet name, the cell references have also changed. Can anyone help?

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Automated Hyperlink format?

    Prashsagar,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  9. #9
    Registered User
    Join Date
    06-05-2013
    Location
    San Antonio, Texas, USA
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: Automated Hyperlink format?

    Hi, hope someone from this thread is still around or an expert that can contribute... what does "original" stand for in the sub written above? And what does "addr" stand for?

    In matching the value in column "A" to, for example, worksheets named likewise, as in the example above, how would it be modified so that column "A" has hyperlinks to those sheets?

    Any help would be greatly appreciated... this is how I've re-written the code but it doesn't seem to work...
    'create hyperlinks for each value in "A" to go to matched worksheet named likewise
    Please Login or Register  to view this content.
    Last edited by arlu1201; 06-05-2013 at 03:18 AM.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Automated Hyperlink format?

    CalRam,

    Welcome to the forum.

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.

    Also,

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1