Hi folks….I have a quick (I hope) question…I took a 9MB file (a scheduling file for 2008) and wanted to prepare the same file for 2009….I added 1 or 2 very small macros; I deleted a sheet in the workbook….when I saved the file, it had exploded to 19.5 MB……I didn’t add any new formulae or any new conditional formatting……the one thing I did was to open it and save it immediately as ***(v.2009).xls and at that time, there were a lot of sheets in ‘frozen pane’ mode…..could that have effectively doubled the file size??? And, if not that, any ideas as to what else might have caused it?? Thanks
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
‘Exploding’ file size (Excel 2003)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » ‘Exploding’ file size (Excel 2003)
- This topic has 11 replies, 10 voices, and was last updated 16 years, 6 months ago.
AuthorTopicDavid Mcnab
AskWoody PlusJanuary 20, 2008 at 2:21 am #447842Viewing 1 reply threadAuthorReplies-
WSmbarron
AskWoody LoungerJanuary 20, 2008 at 3:34 am #1093341Just a stab in the dark on this one.
Do you have and “objects” in the workbook? Items such as auto shapes or boxes or lines. The reason I ask is because I had a user who’s workbook had blown up to 9 MB and was running extremely slowly. He had 5 lines drawn on the works sheet. When I removed them, the file size was less than 100kb. He had been using the workbook as a template and re-saving over and over.
-
WSRudi
AskWoody LoungerJune 24, 2008 at 3:53 pm #1093351* Workbooks can grow larger than usual due to a number of reasons. The most common are reasons you should check for are:
– Having extra blank sheets in a worbook that are not being used. Delete these sheets as they contribute to the file size, even if blank.
– Having excessive formating in the file. Use the Clear formatting command to easily get rid of unnecessary formatting.
– Having object like shapes, pictures, clipart, diagrams and charts in the file. If they are not really needed, remove them.
– Using cells in the sheets, and then not resetting the last used cell. ***(See the macro below will help to reset unused cells)
– Using large nested functions. A common example are large nested if functions. If possible, replace them with a function that removes the nests, like VLookup in this case.
– Using array functions where not necessay
– A corrupt workbook could cause this problem. Copy the data into a new file.
– Using unnecessary code. Any VBA code is not the most optimal inclusion in a workbook. Before using code, find out if there is not an existing Excel feature that can do the job.
– Ensure there are no hidden sheets in the workbook. Check in the VB editor for hidden and very hidden worksheets.
– Check to see if the file is a Shared workbook (Tools > Share Workbook). It can retain all changes, that could potentially be part of the problem.
– Check to see if you do not have “ghost links” by checking the Names dialog for name ranges with #Ref in them.* A saving technique that one can use to make a workbook smaller is to save it as html or xml, then to resave as xls again. See this webpage that explains the concept:
See: Reduce Size of Excel Files* Try to select the range in the sheet and copy (just the range, NOT the entire sheet) to a blank new workbook. The current workbook could be corrupt, and simply copying the data (and ONLY the data) into a new blank workbook can solve the problem.
* You could also try this
Excel File Size Reduce Software 7.0 to make your file smaller.
I have not tested it myself!!I found this macro. It reduces the file size by looping through sheets and resetting the last used cell. Paste it into a module and run it and see if it does not help. (PS: Ensure that none of the sheets are protected, else the code will fail.)
***
Sub ReduceWBSize()
‘From: http://www.contextures.com/xlfaqApp.html#Unused%5B/url%5D
‘ Re-set used rangeDim myLastRow As Long
Dim myLastCol As Long
Dim wks As Worksheet
Dim dummyRng As Range
Dim AnyMerged As VariantFor Each wks In ActiveWorkbook.Worksheets
With wks
AnyMerged = wks.UsedRange.MergeCellsIf AnyMerged = False Then
myLastRow = 0
myLastCol = 0
Set dummyRng = .UsedRange
On Error Resume Next
myLastRow = _
.Cells.Find(“*”, after:=.Cells(1), _
LookIn:=xlFormulas, lookat:=xlWhole, _
searchdirection:=xlPrevious, _
searchorder:=xlByRows).Row
myLastCol = _
.Cells.Find(“*”, after:=.Cells(1), _
LookIn:=xlFormulas, lookat:=xlWhole, _
searchdirection:=xlPrevious, _
searchorder:=xlByColumns).Column
On Error GoTo 0If myLastRow * myLastCol = 0 Then
.Columns.Delete
Else
.Range(.Cells(myLastRow + 1, 1), _
.Cells(.Rows.Count, 1)).EntireRow.Delete
.Range(.Cells(1, myLastCol + 1), _
.Cells(1, .Columns.Count)).EntireColumn.Delete
End If
End If
End With
Next wksEnd Sub
* More web references to check:
Start Post – post 581,649
post 589,833
The thread staring at: post 581,443
A web page to Decrease Excel Workbook SizeHope something here will help you!!
-
David Mcnab
AskWoody Plus -
WSVegasNath
AskWoody LoungerJune 7, 2008 at 1:34 pm #1111834[indent]
Having excessive formating in the file. Use the Clear formatting command to easily get rid of unnecessary formatting.
[/indent]
Thanks Rudi, that just saved me 20,070kb. My template filesize has dropped from 19.7mb to 166kb.
I’ve been pulling my hair out
, trying to streamline code and delete non essentials, and it was all in the [totally unnecessary] formatting!
-
WSbradjedis
AskWoody Lounger -
WSHansV
AskWoody LoungerJune 10, 2008 at 4:26 pm #1112155If you activate a worksheet and press Ctrl+End, Excel will jump to what it considers to be the last used cell of the worksheet, i.e. the intersection of the last row that contains anything and the last column that contains anything.
If you’ve done a lot of editing in a worksheet, the last used cell may be further down and/or to the right than you’d expect. Sometimes Excel considers a row or column to be ‘used’ even though it doesn’t contain anything if you inspect it visually. This could be caused by stray formatting, or by a cell just containing a space, or something like that. If the used area of a worksheet is larger than expected/necessary, chances are that the file size of the workbook is also larger than expected/necessary. So it may make sense to delete or clear the superfluous rows/columns. -
WSbradjedis
AskWoody Lounger -
WSBeate
AskWoody LoungerSeptember 5, 2008 at 1:05 am #1124483Hello together,
you can adjust the UsedRange for the active sheet by this code:
Sub adapt_UsedRange_in_active_sheet()
ActiveSheet.UsedRange ‘readjustment of UsedRange
End SubFor all sheets in a workbook you can use this code:
Sub adapt_UsedRange_in_all_sheets_of_a_workbook()
‘only working in a loop, because sheet must be active
‘by Uwe Küstner – Germany
Dim Ws As Worksheet
Dim oWs As Object
Set oWs = ActiveSheet
Application.ScreenUpdating = False
For Each Ws In Worksheets
Ws.Activate
ActiveSheet.UsedRange ‘readjustment of UsedRange
Next Ws
Application.ScreenUpdating = True
oWs.Activate
End Sub
-
-
-
-
WSgwhitfield
AskWoody LoungerJune 11, 2008 at 1:38 pm #1112279I found, once in the dim distant past, that a workbook with a large block of formatted cells took up a great deal more storage space than formatting just a group of columns or rows. That would make sense if Excel had to store information for each cell in a block, rather than just one piece of info for a line or column.
That was a few years ago, I have not experimented with that for many years, and certainly not in the most recent version (or two) of Excel.
-
teunotn
AskWoody PlusJune 23, 2008 at 12:31 am #1113915Rudi,
In addition you could use the freeware ASAP Excel Utility (http://asap-utilities.com/%5B/url%5D) and/or not free Fast Excel (http://decisionmodels.com/%5B/url%5D).
Regards, Teunis
WSdiegol
AskWoody LoungerJune 25, 2008 at 4:50 am #1114287Thank you, Rudi!
I’m sure to be returning to your excellent post every now and then.
Yet another possible (and very valuable) solution can be found in this starpost by Jan.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
1 hour, 44 minutes ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
1 hour, 45 minutes ago -
Two March KB5053606 updates?
by
Adam
6 hours, 50 minutes ago -
MS Edge Not Updating to v134.0.3124.95 (rel. 27-Mar-2025)
by
lmacri
2 hours, 59 minutes ago -
Intel® Graphics/Sound Driver updates for 7th-10th Gen Intel® Core™ Processor
by
Alex5723
1 hour, 24 minutes ago -
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
13 hours, 27 minutes ago -
Transferring ALL info/settings from current Firefox to new computer Firefox
by
Tex265
14 hours, 49 minutes ago -
DOGE Wants to Replace SSA 60 Million Line COBOL Codebase in Months
by
EyesOnWindows
9 hours, 36 minutes ago -
KB5051989 Usb printer Post Ipp
by
licencesti
13 hours, 49 minutes ago -
Removing bypassnro
by
Susan Bradley
2 hours, 25 minutes ago -
Up to 30 seconds to show “Recent Topics”
by
PL1
18 hours, 10 minutes ago -
Sound changes after upgrade from W11 23H2
by
WStaylorpsepa
19 hours, 53 minutes ago -
Windows bug blocks BIOS updates for Lenovo ThinkPad laptops
by
Alex5723
22 hours, 56 minutes ago -
O&O Software – ‘World Backup Day’ Sale
by
unbob
19 hours, 16 minutes ago -
Still version 23H2?
by
WSbxcfilm
23 hours, 44 minutes ago -
Ubuntu 25.04 (Plucky Puffin) Beta released
by
Alex5723
1 day, 5 hours ago -
How to install App Store apps on an external SSD
by
Alex5723
1 day, 6 hours ago -
Where is Windows going?
by
Susan Bradley
20 hours, 52 minutes ago -
Installing Feature Update Windows 11 24H2
by
geekdom
2 days ago -
Windows 11 Insider Preview build 27823 released to Canary
by
joep517
2 days ago -
Windows 11 Hotpatch
by
Hackmuss
1 day, 7 hours ago -
System Guard service error still won’t be fixed
by
Susan Bradley
2 days, 1 hour ago -
Operation ForumTroll: APT attack with Google Chrome zero-day exploit chain
by
Alex5723
1 day, 19 hours ago -
Troy Hunt of HaveIBeenPwned Phished
by
Lars220
44 minutes ago -
Microsoft Windows security auditing Code 5061
by
mpw
2 days, 13 hours ago -
Can’t display images in incoming Outlook 365 emails
by
WScopwriter
1 day, 21 hours ago -
Windows 11 Insider Preview Build 26200.5510 early builds of 25H2
by
Alex5723
1 day, 22 hours ago -
0Patch : Micropatches released for SCF File NTLM Hash Disclosure Vulnerability
by
Alex5723
1 day, 22 hours ago -
Select multiple emails and they all open up!
by
CeeJay
3 days, 14 hours ago -
How to remove an update preview
by
Gunny
1 day, 17 hours ago
Recent blog posts
- Removing bypassnro
- Where is Windows going?
- System Guard service error still won’t be fixed
- Third party add ins reminder
- MS-DEFCON 4: Mixed bag for March
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.