Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Reducing File Size.

Reducing File Size

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


2

James complained about an oddity that he noted with his workbooks. He has a workbook to which he added some macros, and doing so increased the size of the file used to store the workbook. (This makes sense—the macros are stored with the workbook.) When James later deleted the macros, Excel did not shrink the size of the workbook file back to its original size.

This behavior is viewed by some as poor design in Excel—the macro data is removed, but the file size remains bloated. There are a couple of things you can try to again regain your svelte file size.

First, try using Save As instead of Save. Doing so causes Excel to create a brand new file for your workbook, and in the process, free up some space. If that doesn't work, you should try individually copying your worksheets to a brand new workbook, and then saving the new workbook. If doing that doesn't work, then you can try copying just the worksheet data (not the actual worksheets) to a different workbook. Obviously, this can become quite time-intensive.

Another option to try is saving the workbook in the .xlsb format. This could reduce the file size by about a third. This format is okay if the file isn't accessed by other programs You could also look for any unused rows and columns at the end of the worksheet. In each worksheet press CTRL+END to go to what Excel thinks is the last cell in the worksheet. If the last cell is in an unused area of the worksheet, then the unnecessary rows colums can be deleted. One reader suggested saving the workbook in .htm or .html format and then resaving it back to .xlsx. This removes any left-over VBA that could cause the file to bloat.

Another thing to try, provided you still have some macros in the workbook, is a free utility called CodeCleaner, written by Excel MVP Rob Bovey. You can find the program on this page:

http://www.appspro.com/Utilities/CodeCleaner.htm

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9242) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Reducing File Size.

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

Deleting a Header

Each new Excel worksheet contains a page header, by default. Follow this tip to get rid of headers you don't need.

Discover More

Limiting the Options when Saving as a Copy

Word allows you to save your documents in a wide variety of formats. If you want to limit the formats that are available, ...

Discover More

Pop-up Windows in Word

Want to add a small pop-up window over a word in your document? There is no way to do this directly in Word, but you can ...

Discover More

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!

More ExcelTips (ribbon)

Remembering Workbook Position and Size

Want Excel to remember where your workbooks were located on the screen and then open them in the same position the next ...

Discover More

Using a Single Password for Multiple Workbooks

While password protecting a workbook does provide some security for the contents in the workbook, if you have several ...

Discover More

Limiting Where a Workbook is Used

Want to limit who can use your workbook and on what system? Locking down a workbook can be trickier than you might imagine.

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 1 + 1?

2023-10-28 19:01:55

Ron S

When you do the SAVE AS remember to select XLSX format to strip out the macros.


2022-02-26 09:15:14

Jay Ullius

The tried-and-true method I've used for decades to reduce Excel file size is to select cell A1 on every worksheet, then save the file (SaveAs not needed).


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.