+ Reply to Thread
Results 1 to 6 of 6

Create hyperlink to file in another folder if listed in column A

  1. #1
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Create hyperlink to file in another folder if listed in column A

    Hello,

    I have a list of dynamic file names in column A starting row 2. What I would like is a macro that would look in another folder (for instance "C:\Temp\Data") for any of those file names (excel files) and would create a hyperlink which would open the file. Place in the link in the adjacent column F (adjacent to the file name column A). However column F contains negative numbers so I don't want to change the value of the cell in column F.

    Thank you in advance for your assistance.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Create hyperlink to file in another folder if listed in column A

    Hi there,

    The following code will examine all values in the Range "A2:A11" of worksheet "Sheet1".

    If any of those values corresponds to a filename which can be located in the folder "H:\Worksheets", a hyperlink to that file will be placed in Column "G" on the same row as the value (filename).

    Please Login or Register  to view this content.
    You can change any of the Const values to suit your own requirements.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Create hyperlink to file in another folder if listed in column A

    Thank you for your response Greg. I will test it to let you know how it works.

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Create hyperlink to file in another folder if listed in column A

    Hi MusicMan,

    You're welcome - please do let me know if it works for you.

    Regards,

    Greg M

  5. #5
    Registered User
    Join Date
    05-27-2011
    Location
    Virginia
    MS-Off Ver
    Excel 365
    Posts
    86

    Re: Create hyperlink to file in another folder if listed in column A

    Greg,

    Thanks for the code. It worked very well for me.

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Create hyperlink to file in another folder if listed in column A

    Hi again MusicMan,

    Many thanks for your feedback - I'm glad I was able to help.

    Best regards,

    Greg M

+ 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. [SOLVED] Macro to create hyperlink list of every file in a folder, subfolders
    By itmanusa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 12:43 PM
  2. Macro to create hyperlink list of every file in a folder, subfolders, and SHORTCUTS
    By Billdick7788 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2013, 11:11 AM
  3. Replies: 3
    Last Post: 09-30-2011, 04:35 AM
  4. Replies: 6
    Last Post: 08-11-2006, 03:41 PM
  5. Replies: 3
    Last Post: 05-06-2006, 11:50 AM

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