How to remove "text to display" for hyperlink. in excel 2007

jamesrossidavid

New Member
Joined
Mar 23, 2010
Messages
2
Remove "text To Display" For Hyperlinks

hi
I have a list of Hyperlinks in one column which have always a display name like:
i am using excel 2007

Email

Name


Behind each Email or Homepage a Hyperlink is hidden. But for every Email address in my file the "text to display" is Email.

Can you help me to find a macro which deletes all display names and shows me the hyperlink like this:

Peter@xyz.de
www.google.de
Carl.True@hotmail.com
www.msn.de

etc.

Thanks a lot
Best regards
Rossi
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
i found this very helpful hope this helps. this is for Excel 2007

u need to first select the hyperlink cells and then press "Alt+F11"

u'll get a new window to setup Macro
just choose the sheet the hyperklink cells u have selected and then paste this

Sub HyperLinkAddressToRight()
Dim h As Hyperlink

For Each h In Selection.Hyperlinks
h.Range.Offset(0, 1).Value = h.Address
Next h
End Sub

then go back to the excel sheet where u have selected the hyperlinked cell u want to extract and press "Alt+F8" and click Run.
hope this works

Cheers:)
 
Upvote 0
Code:
Sub Strip_Hyperlink_Names()
    Dim HLink As Hyperlink

    For Each HLink In ActiveSheet.Hyperlinks
        HLink.TextToDisplay = Replace(HLink.Address, "mailto:", "")
    Next HLink

End Sub
 
Upvote 0
I know this thread is old, nevertheless, I am trying to accomplish this in Excel 2016 and having no luck. The macro runs without error, it just doesn't change anything.

Sub Strip_Hyperlink()
Dim h As Hyperlink



For Each h In ActiveSheet.Hyperlinks
h.TextToDisplay = ""
Next h
End Sub

Any help is appreciated, I have hundreds of hyperlinks the I need to remove the texttodisplay from.
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top