replace Hyperlink with URL  
Author Message
dtimoce





PostPosted: Wed Feb 25 12:55:36 CST 2004 Top

Excel Misc >> replace Hyperlink with URL

Hello

I have an excel table with a column full of Hyperlinks. I would like to re-format that column to display the URL of the hyperlinks instead of the existing hyperlinks

I am using Excel 2003

Any help would be greatly appreciated

Thanks

Excel247  
 
 
Ron





PostPosted: Wed Feb 25 12:55:36 CST 2004 Top

Excel Misc >> replace Hyperlink with URL Hi

Try this

With the hyperlinks in Column A

Sub test()
Dim hyp As Hyperlink
For Each hyp In Columns("A").Hyperlinks
hyp.Range.Value = hyp.Address
' Use this if you want to delete the hyperlink
' hyp.Delete
Next hyp
End Sub


With the hyperlinks in Column A
This will place the address in the cell next to it

Sub test2()
Dim hyp As Hyperlink
For Each hyp In Columns("A").Hyperlinks
hyp.Range.Offset(0, 1) = hyp.Address
Next hyp
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl




> Hello,
>
> I have an excel table with a column full of Hyperlinks. I would like to re-format that column to display the URL of the
hyperlinks instead of the existing hyperlinks.
>
> I am using Excel 2003.
>
> Any help would be greatly appreciated.
>
> Thanks!
>