Excel: convert a column with hyperlinks to just display the links
Solution 1:
Short answer: you can't automate this without VBA.
Manual
This is on a Windows 7 computer; just replace the shortcuts with their corresponding Mac counterparts.
- Highlight a cell with a hyperlink.
- Press CTRL+K. This opens the hyperlink dialog box (see image below). Once it opens, you'll find that your cursor is already in the Address field.
- Press CTRL+A to highlight the entire URL.
- Press CTRL+C to copy it.
- Press ESC or Enter to close the Hyperlink dialog box.
- Paste the URL somewhere via CTRL + V.
VBA
Here's a VBA solution for those who can use it.
Create a VBA module with the following code:
Public Function GetURL(c As Range) As String
On Error Resume Next
GetURL = c.Hyperlinks(1).Address
End Function
To use, enter the following into any cell:
=GetURL(A1)
where A1 contains a hyperlink.
The function at work:
Solution 2:
This may sounds like a brute force method, but it's the best way I've come up with. (I discovered this page when I had the same question myself an hour ago... you could spend all day looking, but sometimes it's just easier to do it and be done with it.)
1) Copy and paste just the cells containing the hyperlinks to a new spreadsheet.
2) Export the spreadsheet, click "Change File Type," select "Save As Another File Type" and save it as a web page (aka an HTML file).
3) Open the web page in your browser and view the source.
4) Copy and paste the source into an text editor.
5) Using the Find/Replace function of the text editor, remove the leading and trailing text of each hyperlink. (In other words, replace said text with nothing: "") Note that this text should be identical for each hyperlink.
6) You should now have a text file with nothing but hyperlinks. Copy and paste as needed back into your original spreadsheet or use however/wherever you wish.
Edited to state that you can actually export to a separate file that is HTM. Close the file out and reopen it in Excel again and it will solve the problem. The =Hyperlink formula is gone and the links are converted into regular links. This method saved me hours and was dead simple and I didn't have to deal with scripts or formulas or VBA or Macros.