Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Getting Rid of All Hyperlinks.
Written by Allen Wyatt (last updated June 19, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
If you inherit worksheets from other people, you may find that some worksheets contain many, many hyperlinks. These hyperlinks are often automatically created by Excel as you import or enter information in the worksheet. (I see them appear all the time when I paste information into a worksheet that was copied from a web page somewhere.)
If you want to delete these hyperlinks, you can do so by right-clicking on them and choosing Hyperlink | Remove Hyperlink from the Context menu. Doing this with dozens or hundreds of hyperlinks can quickly consume a huge amount of time. Accomplishing such a task quicker calls for the use of a macro.
The following macro quickly removes all hyperlinks in a worksheet, without affecting anything else it may contain:
Sub KillLinks1() Do Until ActiveSheet.Hyperlinks.Count = 0 ActiveSheet.Hyperlinks(1).Delete Loop End Sub
The macro works by stepping through the Hyperlinks collection and deleting anything that is located there. (The Hyperlinks collection allows access to all of the hyperlinks in a document. Convenient, huh?)
You can, if desired, make the macro even shorter, down to a single line:
Sub KillLinks2() ActiveSheet.Hyperlinks.Delete End Sub
Select the worksheet you want to affect, run one of these macros, and you just saved yourself tons of time!
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10782) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Getting Rid of All Hyperlinks.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Excel allows you to easily add hyperlinks to a worksheet. Click on it, and the target of the link is opened in a browser ...
Discover MoreWhen copying information from the Internet to an Excel workbook, you may want to get rid of graphics but keep any ...
Discover MoreExcel provides a good number of worksheet functions that can help you pick apart text strings in various ways. In this ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-06-19 10:21:02
J. Woolley
You can also click Ctrl+A to Select All, then right-click and pick Remove Hyperlinks. But neither this nor the Tip's macros will affect formula cells that contain the built-in HYPERLINK function or My Excel Toolbox's SuperLink function (after recalc). See https://sites.google.com/view/MyExcelToolbox/
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments