+ Reply to Thread
Results 1 to 9 of 9

Extract Hyperlink Text by Formula

  1. #1
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Question Extract Hyperlink Text by Formula

    Hi All,

    Is there a way to extract the Hyperlink Text of a cell into another cell by way of using a formula (not by VBA).

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Extract Hyperlink Text by Formula

    It depends what you want to do with it. Give more details, please.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Extract Hyperlink Text by Formula

    If you have ver 2010 (as your profile says), probably no formula to extract what you have inside the HL, but if you have 2016, you could try using =formulatext() to show the formula in text, then extract from that?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Re: Extract Hyperlink Text by Formula

    I have a column where certain cells have a hyperlink to 3 types of destinatiins:
    1 link to other cells within the workbook;
    2 link to cells in other workbooks; and
    3 link to a web

    I need to extract only those web links and show it as a text in the adjacent column.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Extract Hyperlink Text by Formula

    Can you give some examples of text contents? I'm struggling to see why you can't just do =A1, for example, which will give the text of a hyperlink in A1.

  6. #6
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Re: Extract Hyperlink Text by Formula

    =A1 will not give me the Text of Hyper Link, rather it will give me the text in the Cell.

    I hope I am clear here, the Text in the cell is not same as the text of the Hyper Link.

    e.g in Cell A2 I have a Text : "ABCD" where as the hyper link refers to "https://www.google.com....etc"

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Extract Hyperlink Text by Formula

    In that case, you can't do what you want without a bit of VBA. This is a UDF written by Rick Rothstein which has been shared here before:

    Please Login or Register  to view this content.
    It needs to go into a standard workbook module.

    Then use the UDF thus:

    =Hlink(A1)

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Extract Hyperlink Text by Formula

    If hyperlink is constructed via =HyperLink() formula, then you can use Get.Cell() Excel4Macro function.

    Assuming following is in A1:
    =HYPERLINK("https://www.google.com","ABCD")

    In Name manager add following, while you have B1 selected.
    cel_Formula_Text =GET.CELL(6,Sheet1!$A1)
    0.JPG

    Then in B1. Enter following. Adjusting 50 to larger number as needed.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    1.JPG

    Note that file must be saved as Macro enabled workbook (.xls, .xlsm, .xlsb).
    See attached file.

    If the hyperlink is done manually, use UDF by AliGW.
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  9. #9
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Re: Extract Hyperlink Text by Formula

    Thanks a lot, I will consider the same.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] With Hyperlink formula & vba, I want to copy text of hyperlink to the cell it's linked to
    By Freakytone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2017, 05:46 PM
  2. [SOLVED] How to I extract hyperlink addresses from a table column, when different text is visible
    By Tooley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-08-2017, 10:17 AM
  3. VBA: Search text and extract hyperlink in same cell
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2013, 11:59 AM
  4. VBA: Search text and extract hyperlink in same cell
    By sroysroy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-24-2013, 08:55 PM
  5. Extract text from hyperlink destination
    By JTKCPA in forum Excel General
    Replies: 3
    Last Post: 12-09-2009, 02:04 PM
  6. How to extract the ScreenTip text from a hyperlink field
    By arobbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2009, 11:26 PM
  7. [SOLVED] How do I extract hyperlink as text from an array of hyperlinks?
    By Hoya in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-29-2005, 01:20 PM

Tags for this Thread

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