+ Reply to Thread
Results 1 to 6 of 6

extract url from HYPERLINK function

  1. #1
    Registered User
    Join Date
    05-16-2011
    Location
    Vienna, VA
    MS-Off Ver
    Excel 2010
    Posts
    5

    extract url from HYPERLINK function

    Hi all,

    I have a spreadsheet w/a large column of conference names, with the url for the conference embedded using the HYPERLINK function (eg =HYPERLINK("http://www.meeaconference.org/conference.php","MEEA Annual Midwest Energy Solutions Conference"). I want to have a second column that shows JUST the extracted url - is there a way to do this? It seems all the typical url extraction codes only work for a normal embedded url, not the hyperlink function...

    Thank you!!

    Alice

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: extract url from HYPERLINK function

    Since the url is hard coded into the HYPERLINK function, it would be easier to have the url's in their own cells and the HYPERLINK refer to that cell.

    To extract the hyperlink from an existing formula, you can do it through Names.
    Assuming that your column of HYPERLINK formulas is column A. Select the cell B1 and define the name
    Name: AFormula RefersTo: =GET.CELL(6, Sheet1!$A1)

    (Note the relative reference in the name, thus the selection of B1 is important)

    Then, putting the formula =TRIM(MID(SUBSTITUTE(AFormula,CHAR(34),REPT(" ",255)),255,255)) in a cell will return link of column A's formula, as in the attached.
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: extract url from HYPERLINK function

    Here is a UDF:

    http://www.ozgrid.com/VBA/HyperlinkAddress.htm
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: extract url from HYPERLINK function

    Here is a UDF that I worked up.
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: extract url from HYPERLINK function

    Or use Find/Replace command, if the URL is hard coded in the formula.

    Copy the range contains HYPERLINK formula to a new range, then select the range. Press Control+H

    Find What: =*"
    Replace All with blank.

    Again,

    Find What: ","*

    Replace All with blank.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  6. #6
    Registered User
    Join Date
    08-30-2012
    Location
    CA, USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: extract url from HYPERLINK function

    Hi Can anyone explain the method using Names?
    How you do it step by step?
    I don't understand what "=GET.CELL()" is in relation to AFORMULA

    I tried other VBA methods and none of them worked for me. They all end up showing #Names
    But the above Names method worked but I can't do it on my spreadsheet
    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1