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

Preserving Style Formatting when Combining Documents

Insert one document into another and you may not get the results you expect. Here's why, along with what you can do about it.

Discover More

Saving All Open Workbooks

Wouldn't it be nice to have a single command that would save each of you open workbooks, all at once? It's easy to do ...

Discover More

Hiding Outline Symbols

Outline symbols are automatically displayed by Excel when you add subtotals or organize your data using an outline. If ...

Discover More

Program Successfully in Excel! This guide will provide you with all the information you need to automate any task in Excel and save time and effort. Learn how to extend Excel's functionality with VBA to create solutions not possible with the standard features. Includes latest information for Excel 2024 and Microsoft 365. Check out Mastering Excel VBA Programming today!

More ExcelTips (ribbon)

Viewing Workbook Statistics

Excel keeps track of a range of stats about each workbook you use. If you want to take a look at those stats, it's easy; ...

Discover More

Closing a Read-Only Workbook

When you create a workbook that is read-only, users can still make changes to the workbook. When they exit, they are ...

Discover More

Creating a Workbook Clone

If you are afraid of messing up a workbook, consider doing your work on a clone of the workbook. Excel provides an easy ...

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 two more than 3?

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.