Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views2 pages

Use A Macro To Remove All Hyperlinks in Excel

This document describes how to create a macro in Excel to remove all hyperlinks from a worksheet. The macro uses VBA code to loop through each worksheet and delete all hyperlinks using the Hyperlinks.Delete method.

Uploaded by

Biruk Negussie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Use A Macro To Remove All Hyperlinks in Excel

This document describes how to create a macro in Excel to remove all hyperlinks from a worksheet. The macro uses VBA code to loop through each worksheet and delete all hyperlinks using the Hyperlinks.Delete method.

Uploaded by

Biruk Negussie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Use a Macro to Remove all Hyperlinks in Excel

Another way to quickly remove all hyperlinks in an Excel spreadsheet is to write a simple macro.
The process for creating a macro to do this is described below:

 Use the keyboard shortcut Alt + F11 (i.e. press ALT and while holding this down, press
F11), to bring up the Visual Basic Editor;
 Double click on the option ThisWorkbook in the Project Window, at the left of the
Visual Basic Editor (see image below);
 Type (or copy and paste) the below code into the code window, as shown below;

' Code to Remove Hyperlinks in Excel


Sub RemoveAllHyperlinks()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.UsedRange.Hyperlinks.Delete
Next ws
End Sub

 Close the VBA Editor (by clicking on the X in the top right of the window).

To run this macro:

 Select the worksheet that you want to remove the hyperlinks from;
 Use the keyboard shortcut Alt + F8 to bring up the 'Macro' dialog box;
 From the 'Macro' dialog box, select the macro ThisWorkbook.RemoveAllHyperlinks
then click Run.

Warning: running this macro removes all hyperlinks in the worksheet permanently. You will not
be able to use the undo command to return the hyperlinks to the worksheet.

You might also like