Worksheet Deletions Don't Reduce Workbook File Size

Written by Allen Wyatt (last updated February 8, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365


1

Dave has a workbook that was growing in size over time, and he was trying to shrink it. One worksheet contained several PivotTables that were no longer needed, so he deleted that worksheet. The file size did not reduce as expected. To investigate, Dave began deleting all the worksheets in the workbook except one that contained minimal data. The file size stayed huge, so Dave wonders why these major deletions did not reduce the file size.

There are a few things that could be causing this issue, but before jumping into them I want to make sure that the bottom-line assumption in this question is stated fully up front: Dave has deleted all worksheets in the workbook except for a single worksheet that contains only minimal data.

Given this, here are some things to check out:

Are there any hidden worksheets in the workbook? If so, make them visible and delete them, too.

Are there unwanted objects in the remaining worksheet? Press F5, click Special, choose Objects, click OK, then press Delete.

Are there any unused named ranges that you've defined? Display the Name Manager and delete any that you no longer need.

Are there any links to external workbooks or objects? Display the Data tab of the ribbon, click Edit Links, and delete any you no longer need.

Are there phantom cells in the worksheet? Press Ctrl+End to find what Excel thinks is the last-used cell. Delete any unneeded rows above that cell and unneeded columns to its left.

Now, save your workbook using Save As, and make sure it is being saved as an XLSX file. This will get rid of any macros and, more importantly, any user forms that may be defined in the workbook.

That should take care of just about everything, but if not, then it is possible that the workbook is maintaining caches for PivotTables and slicers for some reason. The caches should have been automatically deleted when you deleted the objects and then saved the workbook, but "should have" doesn't always translate to "was." You can use a short macro to make short work of the caches:

Sub ClearCaches()
    Dim pc As PivotCache
    Dim sc As SlicerCache

    For Each pc In ActiveWorkbook.PivotCaches
        pc.MissingItemsLimit = xlMissingItemsNone
        pc.Refresh
    Next
    For Each sc In ActiveWorkbook.SlicerCaches
        sc.ClearManualFilter
    Next
    Application.CalculateFull
End Sub

Remember, as well, that in the latest versions of Excel you can enlist the help of the Document Inspector to get rid of any hidden information. Follow these steps:

  1. Display the File tab of the ribbon and then click Info at the left side of the screen.
  2. Click the Check for Issues button just to the left of the Inspect Workbook option. Excel displays a few options.
  3. Choose Inspect Document. Excel displays the Document Inspector.
  4. Since you are trying to make your workbook as small as possible, make sure all the options are selected.
  5. Click the Inspect button. Excel examines the workbook and provides a report of what it finds.
  6. At the right side of anything found by the Document Inspector is a Remove All button. Click the buttons for those items you want to remove.
  7. Click the Close button to dismiss the Document Inspector.

There is one final thing to keep in mind—every time you delete something and then save the workbook, make sure you use Save As and provide a filename different than the current filename. This is because the operating system (not Excel) is not always good about releasing disk space previously allocated to a file when the file decreases in size. Saving under a new name handles this problem easily.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8305) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

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

MORE FROM ALLEN

Adding Smart Quotes through Macro Text

When text is added to your document by a macro, and that text includes quotes or apostrophes, Word won't change the ...

Discover More

Date Last Edited

When adding headers or footers to your worksheets, you may want to include the date that the workbook was last edited. ...

Discover More

Erratic Behavior of Ctrl+PgDn

Have you ever noticed that when you use Ctrl+PgDn or Ctrl+PgUp that Word may give you results you didn't expect. Here's ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Excel Not Responding

Have you ever been working with data in Excel and experienced a "freeze" where the program stops responding? This can be ...

Discover More

Strange Message about Others Making Changes in a Workbook

Have you ever tried to save a workbook, only to be notified that someone else has made changes in it? What if you are the ...

Discover More

Workbook not Saving

Having trouble saving a workbook? It could have to do with the age, size, and complexity of that workbook. This tip ...

Discover More
Subscribe

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

View most recent newsletter.

Comments

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}] (all 7 characters, in the sequence shown) 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 3 - 0?

2025-02-10 03:52:01

Mike J

I think the best way to begin would be to open the excel file in a zip file manager. The free 7-zip is better than many for doing this as it automatically shows the sizes of the folders as well as the files, and doesn't need you to change the file extension.
Just scanning through this explorer-like display might instantly give a good clue to finding where the bloat is.


This Site

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

Newest Tips
Subscribe

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.