Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Removing blank cells

Status
Not open for further replies.

mrbud1972

Instructor
Aug 26, 2003
43
GB
Hi, does anybody know a sure fire way of removing 'blank' cells. A completely blank excel file is over 6mb!
I have had a couple of vba scripts which appear to work intermitantly. Ie, ill try it on another one and it doesnt work. Maybe i'm pasting it in wrong. I'm not sure.
Ta very much
Martin.
 
Select the row headers, ie Click on the header for row 1, hold down CTRL+SHIFT and then hit the down arrow. Now hit CTRL+- (The CTRL and minus keys) and you will delete all the rows physically (They will be replaced).

Save the file and close and re-open and then do CTRL+END and you should still be at A1. File should now shrink.

That having been said, if it is an empty file then why not just delete and start a new one?

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Thanks for the help. I havnt tried it yet,, but you made a good point. The contents have only been removed completely to confirm the large file size wasnt down to the contents within it. I'll repost when ive tried it. Thanks again.
 
Well, thats certainly worked butI think I failed to miss something out & I do appologise, I need it so the cells where data is still populating the cell remains. I only need it to remove the cells that are empty. Thanks again, Martin.
 
So just select the rows below where your data ends and delete, and then do the same for the columns to the right of where your data ends.

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top