Hyperlinks

G

Gmata

Hello, i want to know if its possible to display the URL's for all the
Hyperlinks.

For example i have a column with all hyperlinks, could i make it display
each URL on the next column?

Thanks
 
T

Tom Hutchins

Try the following user-defined function (I'm using Excel 2003). Paste this
code into a VBA module in your workbook:

Public Function ShowURL(Rng As Range) As String
On Error GoTo SURLerr1
If Rng.Count > 1 Then
ShowURL$ = vbNullString
Exit Function
End If
ShowURL$ = Rng.Hyperlinks(1).Address
Exit Function
SURLerr1:
ShowURL$ = vbNullString
End Function


If a cell with a hyperlink is in A5, in another cell enter
=ShowURL(A5)

Hope this helps,

Hutch
 
Top