Getting Rid of Many Hyperlinks

by Allen Wyatt
(last updated November 5, 2014)

3

Do you create worksheets by pasting information that was copied from the Internet? This is not unusual for some people, as there is quite a bit of public-domain information that can be copied from the Internet. When you paste your information into a worksheet, you may notice that there are quite a few hyperlinks. What if you want to get rid of those hyperlinks? Similarly, you might inherit a worksheet from someone, and it contains a lot of hyperlinks you want deleted.

The easiest approach is to run a macro that deletes all the hyperlinks. The following macro quickly removes all hyperlinks in a worksheet, without affecting anything else it may contain:

Sub KillLinks()
    Do Until ActiveSheet.Hyperlinks.Count = 0
        ActiveSheet.Hyperlinks(1).Delete
    Loop
End Sub

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3249) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Jumping to a Relative Line Number

As you navigate through a document, you may have a need to move forward or backward a specific number of lines. This is easy ...

Discover More

Factory Default Settings for Word

Do you long for a way to reset Word to a 'factory default' condition? It is almost impossible to get things to the way they ...

Discover More

Changing Datasheet Column Width

To see information in a datasheet better, you may need to adjust column width.

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

MORE EXCELTIPS (MENU)

Adding a ScreenTip

If you want people to know something about a hyperlink you added to your worksheet, one way to help them is to use ...

Discover More

Turning Off Hyperlink Activation

Does it bother you when you enter a URL and it becomes "active" as soon as you press Enter? Here's how you can turn off this ...

Discover More

Hyperlinks in Shared Workbooks

Inserting a hyperlink into a workbook that is shared with others is not possible in Excel. Here's what you can do about it.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 9 + 8?

2011-11-12 16:36:51

Dennis Taylor

Forget the macros and eliminate the links this way:

1. Select all of the cells containing the hyperlinks

2. Drag any edge of the selected cells with the RIGHT mouse button into another column or row and then immediately right back on top of the original selection

3. Release the RIGHT mouse button and, from the pop-up menu, select Copy Here as Values Only


2011-11-12 07:12:22

Baz Fitzpatrick

The following macros does the same job but faster and fewer lines of code:

activesheet.hyperlinks.delete


2011-11-12 06:35:41

gerdami

Thanks for this KISS sub!


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share