+ Reply to Thread
Results 1 to 6 of 6

Macro to remove Display Text from hyperlink

  1. #1
    Registered User
    Join Date
    01-11-2011
    Location
    Seattle
    MS-Off Ver
    WA
    Posts
    2

    Macro to remove Display Text from hyperlink

    I have a worksheet full of hyperlinks in a single column - I want to remove the display text in each of the cells so all that remains is the url. This is similar to manually:
    • Right-click the cell with a hyperlink
    • Select 'Edit Hyperlink...'
    • Delete the text in 'Text to Display' box
    • Click OK
    • Repeat on next cell below

    I recorded a macro based on the list above but I can't seem to modify it to do all cells at once.

    There are over a thousand cells to do this in, all in column J. I've fumbled my way thru this for fours hours with no luck, so any ideas are greatly appreciated.

    Gary

  2. #2
    Registered User
    Join Date
    12-18-2010
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010
    Posts
    79

    Re: Macro to remove Display Text from hyperlink

    Hello

    Please supply an example spreadsheet.
    David
    Access and Excel Developer | UK

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to remove Display Text from hyperlink

    You could perhaps try something along the lines of:

    Please Login or Register  to view this content.
    modify references as nec.

  4. #4
    Registered User
    Join Date
    01-11-2011
    Location
    Seattle
    MS-Off Ver
    WA
    Posts
    2

    Re: Macro to remove Display Text from hyperlink

    Quote Originally Posted by DonkeyOte View Post
    You could perhaps try something along the lines of:

    Please Login or Register  to view this content.
    modify references as nec.
    Wow. You hit it out of the park on the first try! I replaced my macro code with this, udpated the sheet name, ran it in my spreadsheet and voila - nothing but hyperlinks! You, sir, are a hero.

    Thank you very much.

    Gary

  5. #5
    Registered User
    Join Date
    01-30-2012
    Location
    West Virginia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Macro to remove Display Text from hyperlink

    I had this same issue and copied this code verbatim and then just changed my Column to C. It did it in like 2 seconds exactly the way I wanted it. Thanks so much.

    Now I just have to sit down and go through this code so I understand how it works in case I need to do it again.

  6. #6
    Registered User
    Join Date
    11-05-2019
    Location
    Blackpool, London
    MS-Off Ver
    2010
    Posts
    1

    Re: Macro to remove Display Text from hyperlink

    Dear Gary, you are an absolute HERO. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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