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 July 9, 2018)


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.


If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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


Insert a TOC without Upsetting Pagination

Insert a table of contents in your document, and your page numbering may get thrown for a loop. If you want the page ...

Discover More

Using Revision Tracking

Want to keep track of the changes other people make to your workbook or even your own changes? Excel makes gathering this ...

Discover More

TOC Heading Numbers Always Show in Bold

Linda's got a document that includes a table of contents that is based on headings in the document. When the headings ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Specifying Your Target Monitor

When you create a worksheet that is destined for viewing on the Web, you will want to specify the monitor resolution you ...

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

Linking to a Specific Page in a PDF File

The HYPERLINK function is great for linking to Web pages and some other resources, but it won't allow you to access a ...

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 5 - 2?

2020-05-19 11:07:27


Amazing solution!

2019-12-25 12:24:21

Siddhi Jain

Thanks a lot! It worked.

2019-11-28 21:00:28


Champion! That text-box was driving me nuts. Works in Excel 365.

2018-10-13 15:48:59

John Easterwood

Pressed F5, Select, Objects and all Objects were selected, but when I tried to select objects to be deleted, selection went away without deleting the object. Need a way to select some but not all of the objects. Thanks.

2018-07-14 23:51:02

Paul Muresan

Great! I thought it was somthing complicated but solved all my problems.

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.