+ Reply to Thread
Results 1 to 6 of 6

Curious Hyperlinks

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    the Netherlands
    MS-Off Ver
    2016
    Posts
    56

    Curious Hyperlinks

    In the excel file attaches, you will find 3 hyperlinks. However, the first 2 are curious. They show respectively "jan-13" and "12", but these strings are NOT the TextToDisplay. For these 2 hyperlinks the TextToDisplay is empty (or ""). The third hyperlink show a correct TextToDisplay "Nieuwe ontwikkelingen".
    I have 2 questions:
    1) What are the string shown in the first 2 hyperlinks?
    2) How can I convert these 2 to correct hyperlinks? (Preferable in VBA)

    Kind reagrds

    Jan Lichtenbelt
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Curious Hyperlinks

    When the cell contents are numeric or reference another cell....Excel displays <<Selection in Document>>.
    Otherwise it displays the cell text.

    What do you want the displayed text to be?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-07-2014
    Location
    the Netherlands
    MS-Off Ver
    2016
    Posts
    56

    Re: Curious Hyperlinks

    Dear Ron,

    I want to remove the hypelink into the text show as is. In the original excel file it is not just one cell but a (large) column.
    CAn you help me with a VBA for both colums 1 (or 2) and 3?

    Kind regards

    Jan Lichtenbelt

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Curious Hyperlinks

    The below VBA code sets hyperlink displayed text to equal the hyperlink target.

    • ALT+F11.....to open the Visual Basic Editor
    • Right-click on your workbook name in the VBA Project panel
    ...Insert: Module
    • Copy the below VBA code and paste it into that module:
    Please Login or Register  to view this content.
    In your workbook...
    • Select the range of cells containing hyerlinks
    • ALT+F8...to open the Macros window
    ...Select SetHlinkText...Click: Run

    Is that something you can work with?

  5. #5
    Registered User
    Join Date
    07-07-2014
    Location
    the Netherlands
    MS-Off Ver
    2016
    Posts
    56

    Re: Curious Hyperlinks

    Dear Ron,

    The macro helps transforms the original hyperlink cells into new hyperlink cells with only the address.

    What I want is that the original cells will be transformed in strings with the content equal to what you see in the owrksheet. That means to be transformed respectively into jan-13 12 nieuwe ontwikkelingen ( see attached file on row 2)

    Instead of 3 strings the format may also be respectively date number and string.

    Kind regards

    Jan
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-07-2014
    Location
    the Netherlands
    MS-Off Ver
    2016
    Posts
    56

    Re: Curious Hyperlinks

    Although I'm still interested in the VBA code, I found a solution in the worksheet. Just select the applicable cells and delete the hyperlink. The top text remains, as wanted.

    Jan Lichtenbelt

+ 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. Find Hyperlinks, Copy Hyperlinks to alternative sheet, print all hyperlinks
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 05:13 PM
  2. I'm only being curious.
    By Jo-Jo in forum The Water Cooler
    Replies: 13
    Last Post: 12-02-2009, 09:25 PM
  3. Just curious
    By famdamly in forum Excel General
    Replies: 2
    Last Post: 12-06-2005, 09:45 PM
  4. [SOLVED] Just curious
    By RedChequer in forum Excel General
    Replies: 3
    Last Post: 03-10-2005, 08:06 PM

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