Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hyperlinks (2000)

    I have a column on a worksheet that has cells with hyperlinks (not every cell). These hyperlinks have a different textToDisplay. I want to be able to extract the actual hyperlink address not the text to an adjacent cell.
    Anyone know how to do this?

    TIA
    Mark

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

    Re: hyperlinks (2000)

    Create the following custom function in a standard module:

    Function HyperlinkAddress(oCell As Range) As String
    On Error Resume Next
    HyperlinkAddress = oCell.Hyperlinks(1).Address
    End Function

    (The line On Error Resume Next avoids error values if the cell referred to does not contain a hyperlink.)

    Say that A1 contains a hyperlink. Enter the following formula in B1 to see the hyperlink address:

    =HyperlinkAddress(A1)

    If you store the function in a module in your Personal.xls, use

    =Personal.xls!HyperlinkAddress(A1)

  3. #3
    Star Lounger
    Join Date
    Mar 2003
    Location
    Ilkeston, Derbyshire
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hyperlinks (2000)

    Hans
    Exaclty what I needed. Thank you

    Mark

Posting Permissions

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