Question : excel linked text - how to get the url of the link?

look at the excel file and see col. B
it has linked text so you see a filename but when you hover over the cell or click a cell it redirects you to a URL.

how can i extract the url's of these cell's linked text into another col?
Attachments:
 
linked text
 

Answer : excel linked text - how to get the url of the link?

Assuming you have your .xlsx file open and visible in Excel, open up the VBE with Alt+F11.  In the top left of the VBE is the Project Window, and you should see your file listed here.  If you right-click on it, you should have an option to Insert>Module.

This will insert a standard module into the project which will now be visible on the right-hand side of the VBE (as a white window) - this is to where you need to copy and paste the code I gave you.  Once the code is pasted into this window, you can use the function as you would any other formula in Excel eg select a cell and type:

=ReturnURL(A1)  

Just to reiterate, you will need to save the file down as an xlsm if you don't want to copy and paste values over the UDF formulas (as .xlsx files don't support VBA code).

Richard
Random Solutions  
 
programming4us programming4us