Converting Hyperlinks to URL

Bobdog

New Member
Joined
Feb 14, 2008
Messages
7
Q? I have a several hundred entity names that each function as a hyperlink. Each name is associated with a distinct web URL. While this is cool, I want to format the cells to show only the web URL. How do I convert these hyperlinks to the URL address? Is their a paste special function or command I can use?

Thanks!!!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You can paste this code into a VBA module

Code:
Function GetAddress(HyperlinkCell As Range)
    GetAddress = Replace(HyperlinkCell.Hyperlinks(1).Address, "", "")
End Function

then, if your first link is in A1 enter =GetAddress(a1) into B1 and autofill down.

Is this what you need?

JB
 
Upvote 0
Code required a change in the function name to GetAddress2. Not sure why, but I assume the name was already in use???

Thanks. Once the function name was changed it worked slick!
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,973
Members
449,059
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top