Two ways to bulk delete a hyperlink in Excel 2007

Source: Internet
Author: User
Tags contains

In Excel, a column cell contains hyperlinks, and you have to remove hyperlinks by hand: Right-click any cell in the column that contains the hyperlink, and select Cancel hyperlink (Figure 1). As a result of the large number, we can only consider the use of bulk deletion method.

One, the macro code removal method

Open the Excel file, switch to the "View" tab, click "Macros" → "Record Macro", the "Record New Macro" window, the "macro name" to define a name: Removehyperlinks (Figure 2), click "OK" exit;

Click "Macros" → "View Macros", select "Removehyperlinks" under "Macro name" and click "Edit", open the Microsoft Visual Basic Editor, replace all the code in the right window with the following (Figure 3), and then save the VBA editor close:

Sub RemoveHyperlinks()
‘Remove all hyperlinks from the active sheet
ActiveSheet.Hyperlinks.Delete
End Sub

Click "Macros" → "View Macros", select "Removehyperlinks" under "Macro name" and click "Execute" to remove the link from the sheet.

The same purpose can be achieved with the following code:

Sub ZapHyperlinks()
Cells.Hyperlinks.Delete
End Sub

Second, the selective pasting method

Right-click the column that contains the hyperlink and select Copy, then insert a blank column to the right of the column (left), and then right-click the blank column and select Paste selective (Figure 4).

In the Paste Selective window that appears later, click the value option (the attentive person will find that when you select options such as value, the Paste Link button becomes grayed out, and in Figure 5, the hyperlink is naturally not pasted, and the column is retained, and the column that originally contains the hyperlink is deleted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.