Automate the Hyperlink process for multiple cells to folders?

jserow

New Member
Joined
Aug 22, 2004
Messages
36
I want to make a hyperlink for these cells going to folders of the same name.
I would like to automate this process as I have over 250 individual cells to link to folders accordingly.
Is this a possibility?


201712001 <= i.e. to folder D:/2017/12/201712001
201712002 <= i.e. to folder D:/2017/12/201712002
201712003 <= i.e. to folder D:/2017/12/201712003
201712004 <= i.e. to folder D:/2017/12/201712004
201712005 <= i.e. to folder D:/2017/12/201712005
201712006
201712007
201712008
201712009
201712010
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this, changing the Range to suit:

Code:
Sub Create_Hyperlinks()
    Dim cell As Range
    For Each cell In Range("A2:A10")
        cell.Parent.Hyperlinks.Add Anchor:=cell, Address:="D:\2017\12\" & cell.Value
    Next
End Sub
 
Upvote 0
John_w,

Thank you very much for your help with this. The code worked like a charm. :biggrin:

It is very much appreciated, what would have taken me hours to complete took literally minutes for 12 months worth.

Thanks Again,
JSerow
 
Upvote 0

Forum statistics

Threads
1,215,155
Messages
6,123,332
Members
449,098
Latest member
thnirmitha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top