Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Get Rid of Web Stuff.

Get Rid of Web Stuff

by Allen Wyatt
(last updated September 7, 2013)


Grant regularly copies information from Web pages and pastes that information into worksheets. He ends up not only with raw data, but also with other items, such as checkboxes, pictures, logos, etc. Grant wants an easy way to get rid of all these non-data items.

The first thing that most people try is to use Go To Special, in this manner:

  1. Press F5. Excel displays the Go To dialog box.
  2. Click the Special button. Excel displays the Go To Special dialog box. (See Figure 1.)
  3. Figure 1. The Go To Special dialog box.

  4. Select the Objects option.
  5. Click OK.

When you do this, Excel selects a number of the objects in the worksheet, and you can then press the Delete key to get rid of them. The problem is that this method doesn't select all the non-data items in the worksheet; it only selects a subset of them—those items that are considered "objects" by Excel.

A better solution is to use a macro to select all the shapes in the worksheet and then delete them. This is fairly simple to do, using a macro like this one:

Sub DeleteAllShapes1()
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
End Sub

The macro just loops thru each shape on the active worksheet and deletes each one. You could expand on the macro just a bit by having it also delete all the hyperlinks that are pasted in the worksheet. All it takes is the addition of a single line:

Sub DeleteAllShapes2()
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
End Sub

If, for some strange reason, these macros don't get rid of all the non-data items you want removed, there is another approach you can use: make a stop in NotePad before Excel. Simply paste your Web data into a blank NotePad document, then select that information (after it is pasted) and copy it back to the Clipboard. Then, paste it into Excel. The only thing that is left should be straight data.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2881) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Get Rid of Web Stuff.

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. ...


Printing without Track Changes Marks

If your document has a lot of markup visible in it, you may want to print a copy of the document that doesn't reflect ...

Discover More

Checking for Valid Hyperlinks

If you have a document containing a lot of hyperlinks, it would be cool if there was a way to check all those hyperlinks ...

Discover More

Copying Worksheet Code Automatically

When creating a workbook to be used by others, you may want any worksheets they add to the workbook to contain some ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Hyperlinks that Open in a Different Browser Window

When you click a link in a browser, the target of that link might open in the same window or in a new window. Getting an ...

Discover More

Setting Web Fonts

Is your worksheet information destined for a Web page? Here's how you can specify the fonts that should be used when ...

Discover More

Specifying a Browser in a Hyperlink

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 More

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

View most recent newsletter.


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. Maximum image size is 6Mpixels. 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 4 + 4?

2017-05-09 10:39:03


Thank you for this tip. This worked amazingly well at speeding up my excel file. Thank you once again. Microsoft was useless at giving me a solution for this!

2017-03-03 09:51:58

John Drohan

That you for this post. The first macro worked like a charm. Thank you.

2016-11-07 16:08:45


The F5 tip shown in Figure 1 was enough for me! I had javascript objects I couldn't get rid of. I didn't need the macro but it looks cool! THANKS!

2016-05-27 09:17:18


This worked perfectly. Thank you.

2016-03-07 17:32:21


Thanks a lot.

2016-01-08 18:18:05


After trying the Microsoft NON-solution - thank you for helping me get rid of those javascript links!

2015-08-20 15:27:45


OMG this is fantastic. I have always tried to copy out of our company's directory into a spreadsheet but it always brings in three columns of icons-- and I've never found an easy way to get rid of them. Three clicks and Gone? The Go-to Special, Objects, Delete key worked in Office 2013 too!

2015-07-24 16:30:29


Thank you ! My Excel spreadsheet got bogged down with embedded javascript links. The response time was so bad until I got this tip to remove the unwanted object.

2015-06-11 14:36:38


Thank you for saving me from enormous aggravation and loss of productivity. After reading this tip, it took two seconds to remove something that has been frustrating me for a half hour.

2015-06-05 02:44:10


thanks a lot allen.
it saved my day

2015-04-14 10:12:13


Exactly what I needed. Thanks!

2015-04-02 09:49:39


Thanks a lot for this tip. Really helped. Cheers!

2015-02-18 08:10:39


It really helped after spending an hour or so with other solutions. This object was copied and pasted from web into an excel sheet.

2014-12-15 04:00:35


thanks a lot ! work fine !

2014-12-09 12:39:10

Rick A

I used your DeleteAllShapes2 and Delete Hyperlinks Macro and it worked like a charm. My workbook was really bogged down.

Thanka a lot for the help!


2014-06-27 12:05:32


Hi Allen,

Thanks for the article.

I have a question though.

I am using multiple web broswers(1 for each day in our weekly report so total of 5). For some of our days there are no campaigns hence there won't be any url for
that day. However I will come to know only when the report is run. IS there a way to delete just few of the web browsers out of the 5 that I have. The number of web browsers to delete for a particular week may be 1,2,3 or 4 which I will come to know only after I run the report.

2014-05-21 01:23:04

Vivek K

Thanks, for the pro advise it really helped me.

This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips

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.