Tuesday, August 25, 2009

Removing lots of hyperlinks in Excel 2007

 

Question:  How do you remove many hyperlinks from an Excel spreadsheet at once, say after pasting in a a large HTML table?

Answer:  Use a handy-dandy Excel 2007 macro to delete the hyperlink addresses in your Excel sheet.

Open your Excel spreadsheet that you wish to remove the hyperlinks from. Go to your Developer Tab in the top ribbon (you may need to enable the Developer tab). Find and click the “Macros” button the Developer ribbon.

In the “Macro Name” box, enter “RemoveHyperlinks” and then select the “Create” option button. You’ll be taken to the Macro editor.

Paste following code into the editor:



    Sub RemoveHyperlinks()

        'Remove all hyperlinks from the active sheet

        ActiveSheet.Hyperlinks.Delete

    End Sub


It needs to look exactly like the example above. No extra text.

Next, close the editor window by selecting "Close and Return to Microsoft Excel" under the File menu.

Now, go to the sheet that contains the hyperlinks that you wish to delete. Select the cell(s) you want to update.

On the Developer ribbon, select the Macros button again.

In the Macros popup dialogue, highlight the macro called "RemoveHyperlinks" and click on the Run button.

Voila!.Your hyperlinks should be deleted.

This is the updated version (for Excel 2007), of this fine tip: http://www.techonthenet.com/excel/macros/delete_hl.php

Kudos to the original author..

Posted via email from Lance's miscelanny

0 comments: