Forum Discussion
tachyglossus
Apr 06, 2020Copper Contributor
How can I extract URL from hyperlinks?
I have a worksheet where one column contains hyperlinks (like created with =HYPERLINK(link;text)). How can I create a formula extracting link urls from those hyperlinks? I've tried dozen of search qu...
datta9381
Aug 19, 2021Copper Contributor
- Open up a new workbook.
- Get into VBA (Press Alt+F11)
- Insert a new module (Insert > Module)
- Copy and Paste the Excel user defined function below
- Press F5 and click “Run”
- Get out of VBA (Press Alt+Q)
Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub
https://my-notebook-online-2021.blogspot.com/2021/08/how-to-extract-hyperlink-in-excel.html
AdamLong
Sep 23, 2022Copper Contributor
Thank you. The VBA code worked quite well.