Tip & How-To about Microsoft Excel for PC
The following script could be used to extract the actual URLs from the text link in an Excel spreadsheet. The script writes each URL in the cell
next to the text link:
Sub main()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Range.Offset(, 1) = h.Address
Next
End Sub
Here is how to use the script:
1.
On the "Tools" menu, point to "Macro", and then click "Visual Basic
Editor". This will open the Visual Basic Editor in another window.
2.
On the extreme left, you will find the "Project - VBAProject".
Double-click the icon named "Sheet1 (Sheet1)", "Sheet2 (Sheet2)", or
whatever the name of your worksheet. This will open a blank window.
Copy & paste the script into this window.
3. Press F5, then click on "Run".
4. Go back to your Excel window. You will now find the URLs listed in the next cell to the original one with the hyperlink.
1,466 views
Usually answered in minutes!
×