Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink (XL97:SR2)

    Is there a formula equivalent to the following code?

    oLink = ActiveCell.Offset(0, 0).Hyperlinks(1).Address


    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hyperlink (XL97:SR2)

    I assume you meant something different from 0,0, for ActiveCell.Offset(0,0) is the same as ActiveCell. But in response to your question: I don't know of a built-in function that returns a hyperlink address. But you could create a custom function:

    Function GetHyperlink(oRange As Range) As String
    If oRange.Hyperlinks.Count > 0 Then
    GetHyperlink = oRange.Hyperlinks(1).Address
    End If
    End Function

    You can use it like this: =GetHyperlink(A1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •