top of page

Automatically create static hyperlinks in Excel - without the HYPERLINK function

If you don't want to use the HYPERLINK function in Excel to create links on a spreadsheet, but instead want to automatically add in 'static' hyperlinks that don't rely upon the dynamic information in the function, you can use the below vba code.


Begin with a worksheet like this, with the names to be displayed for the links in one column, and the file paths for the links in the column to the right.





Edit the visual basic code so that the range listing the file paths is listed:



The macro will automatically create hyperlinks in the second column.





Sub CreateHyperlinks()

Dim cl As Range


For Each cl In Range("B2:B3").Cells '## Modify as needed

cl.Hyperlinks.Add cl, cl.Value, , , cl.Offset(0, -1).Value

Next


End Sub


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page