Tuesday, May 01, 2012 8:55 PMI know there are functions for that will read the links in column A and write the hyperlink out to column B. But I have not used VBA for so long I forgot even the basics of how to set it up. Can someone point me to what I need to get from here to where I need to be in order to extract this information from my spreadsheet?
Tuesday, May 01, 2012 9:24 PM
Press Alt+F11 to activate the Visual Basic Editor.
Select Insert | Module.
Copy the following code into the module:
Function GetURL(rng As Range) As String Application.Volatile If rng.Hyperlinks.Count > 0 Then GetURL = rng.Hyperlinks(1).Address End If End Function
Close the Visual Basic Editor.
Let's say the first hyperlink is in A2.
Enter the following formula in B2: =GetURL(A2)
You can fill this formula down as far as needed.
Remark: the formulas will not be updated automatically when the hyperlinks are edited. Press F9 to update the formulas.
Regards, Hans Vogelaar
- Marked As Answer by Lalewicz Wednesday, May 02, 2012 4:00 AM
Wednesday, May 02, 2012 4:00 AMI cannot thank you enough. I appreciate this so much.