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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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. :-D

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,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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