Excel - List a Hyperlink in a Cell
- Sean O'Shea
- May 3, 2015
- 1 min read
This is a useful little macro. It could be of use when you have documents hyperlinked in an Excel column and need to copy them elsewhere. Once you have the addresses of the links, you can do so in a batch file.
To get the address of the hyperlinks listed in an Excel column, enter this macro in a VBA module:
Public Function GetURL(c As Range) As String
On Error Resume Next
GetURL = c.Hyperlinks(1).Address
End Function
Then put this formula, =GetURL(A1) in a cell, where the link you need is listed in cell A1.
Special thanks to Ellesa who posted this macro at:
Recent Posts
See AllHow is data generated by aiR utilized by Relativity? Relativity has published a white paper addressing its AI security policies assuring...