Excel.Tips.Net ExcelTips (Menu Interface)

Get Rid of Web Stuff

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.

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.

Related Tips:

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

mark    07 Nov 2016, 16:08
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!
Margaret    27 May 2016, 09:17
This worked perfectly. Thank you.
Achates    07 Mar 2016, 17:32
Thanks a lot.
Denise    08 Jan 2016, 18:18
After trying the Microsoft NON-solution - thank you for helping me get rid of those javascript links!
Melanie    20 Aug 2015, 15:27
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!
howard    24 Jul 2015, 16:30
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.
Jacqueline     11 Jun 2015, 14:36
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.
pratap    05 Jun 2015, 02:44
thanks a lot allen.
it saved my day
dvs    14 Apr 2015, 10:12
Exactly what I needed. Thanks!
Chiranjiv    02 Apr 2015, 09:49
Thanks a lot for this tip. Really helped. Cheers!
Balram    18 Feb 2015, 08:10
It really helped after spending an hour or so with other solutions. This object was copied and pasted from web into an excel sheet.
belgiumpma    15 Dec 2014, 04:00
thanks a lot ! work fine !
Rick A    09 Dec 2014, 12:39
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!

Shai    27 Jun 2014, 12:05
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.
Vivek K    21 May 2014, 01:23
Thanks, for the pro advise it really helped me.

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.