Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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

by Allen Wyatt
(last updated December 19, 2019)

4

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 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, and 2013. 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

Jumping to a Section

One way you can navigate through a document is to jump from section to section. Here's the traditional way to quickly get ...

Discover More

Inserting the Total Number of Characters in Your Document

One of the things that Word keeps track of regarding your document is the number of characters it contains. Using the ...

Discover More

Adding Horizontal Lines at the Sides of a Word

Want to add a couple of horizontal lines at the sides of a word? It can be trickier than it sounds, but there are several ...

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 (ribbon)

Remembering Workbook Settings from Session to Session

You can spend a lot of time getting your workbook to look "just right." Wouldn't it be great if Excel was able to ...

Discover More

Opening Two Workbooks with the Same Name

If you have two workbooks that each have the same name, opening them at the same time in Excel could cause some problems. ...

Discover More

Comparing Workbooks

Do you need to compare two workbooks to each other? While you can use specialized third-party software to do the ...

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

2020-01-02 10:43:03

Gregg J

Another method to reduce file size is to save as .htm or .html file format, then resave it back to .xlsx. This removes VBA and other things that cause file bloating.


2019-12-22 07:29:23

Chris McCarthy

Another thing to try is to look for unwanted blank columns and rows with no data but seen as in use by Excel.

in each sheet press CTRL-END to go to what Excel thinks is the last cell in the sheet. If it's in column F but you've only used up to column D you can delete columns E and F. Treat the rows in the same way and when you save the spreadsheet it will reset the end cells and reduce the size of the file. The unused rows or columns may be due to formulae. For instance, if you sue =SUM(A1:A500) instead of =SUM(A:A) then even if you only use 50 rows all 500 are marked as in use. Change the formulae and delete the unwanted rows/columns.


2019-12-19 10:43:43

Dave Bonin

One of the best ways to reduce file size and speed up file opens and saves is to save Excel files in the .XLSB format.

I find mine are generally about a third smaller in size when saved in .XSLB formats rather than .XLSX or .XLSM formats.

It appears to me that Microsoft pushes the .XLSX and .XLSM formats as they may allow other programs to better access to the contents of Excel files. That's fine when you need that sort of access, but 99% of the time we don't. I believe the vast majority of Excel files are used all by themselves, with no interconnections to the outside world.


2019-12-19 08:29:36

roY tAylor

It is a pity that this Code Cleaner, which does a great job, only works on a 32 bit version of Excel


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.