Is there a function that is available (I didn't find one
in the standard functions Excel offers), or does anyone
have a macro?
Thanks in advance,
Markus
Function HyperlinkAddress(cell)
On Error Resume Next
HyperlinkAddress = cell.Hyperlinks(1).Address
if hyperlinkaddress = 0 then hyperlinkaddress = ""
End Function
=HyperlinkAddress(A1)
More infomation on this and similar hyperlink things in
http://www.mvps.org/dmcritchie/excel/buildtoc.htm
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"Markus Riester" <Markus....@motorola.com> wrote in message news:186501c234be$cfaf06a0$36ef2ecf@tkmsftngxa12...
Function HyperLinkText(oRange As Range) As String
Dim ST1 As String, ST2 As String
If oRange.Hyperlinks.Count = 0 Then Exit Function
ST1 = oRange.Hyperlinks(1).Address
ST2 = oRange.Hyperlinks(1).SubAddress
If ST2 <> "" Then ST1 = "[" & ST1 & "]" & ST2
HyperLinkText = ST1
End Function
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
Thanks
Ryan
Yes
In the VB editor you need to Insert / Module if there are no standard
modules already in your workbook. Then paste the code into that
module.