+ Reply to Thread
Results 1 to 4 of 4

Create hyperlink paths based on cell contents

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    East Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Create hyperlink paths based on cell contents

    Hi all,

    I'm new to VBA and even newer to this forum (first post). I'm trying to write a macro that mainly does two things: 1) create a windows explorer folder and name it according to each cell in a column, and 2) link each cell to its corresponding folder. I have sucessfully done the first, and can do the second but only for one cell at a time.

    So here's the question: How can I loop the code so that it creates a separate link for each cell?

    The part that's stumping me is that the cell contents is only the destination of each path.

    Example: I'm practicing this on a much smaller sheet before applying it to the large tracker at work I plan to implement it to. So right now I have a simple spreadsheet, just a list of useless folders (Folder1, Folder2, ... , Folder7) The macro now creates these seven folders in my C: drive, so the path for Folder1 is C:\Folder1 (super simple, I know, just bear with me) What I want to do is have the macro link each cell to the folders it just created, instead of manually inputing the path for every one.

    So how do I create a macro that can write a link to a custom path for each cell at once? .. the destination of each path being the cell contents.

    Thanks for your help, and sorry for the wall of text!

    -Mike

  2. #2
    Registered User
    Join Date
    05-14-2013
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003/2010
    Posts
    17

    Re: Create hyperlink paths based on cell contents

    Don't think you need a macro... i.e. If the values (Folder1) are in Column A, then in Column B you could just use:

    Please Login or Register  to view this content.
    Then just copy that down... should fix you right up!

  3. #3
    Registered User
    Join Date
    08-05-2013
    Location
    East Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Create hyperlink paths based on cell contents

    Thanks that simplifies things a lot! On a semi-related note: I keep getting a #NAME? error when I try to give each link a Friendly Name. The paths I'll be dealing with when I implement this tool are long and ugly, so it would be much better to have a "Click Here" link instead of a massive path.

    Thanks again.

  4. #4
    Registered User
    Join Date
    05-14-2013
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003/2010
    Posts
    17

    Re: Create hyperlink paths based on cell contents

    Great, glad it helps!

    Are you using?:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to conserve hyperlink paths when directory is changed
    By rramoutar7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2013, 04:33 AM
  2. Create List and Hyperlinks Based Upon Cell Contents
    By nofzinger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2010, 03:44 PM
  3. How to create a Web Hyperlink based on Cell Contents?
    By chatguy in forum Excel General
    Replies: 2
    Last Post: 10-15-2007, 04:24 PM
  4. [SOLVED] How to force Excel to NOT update hyperlink paths?
    By Joe HM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2005, 10:05 AM
  5. [SOLVED] converting hyperlink paths
    By Bill Sigl in forum Excel General
    Replies: 2
    Last Post: 05-16-2005, 06:06 AM

Tags for this Thread

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