75MB Excel File - Can't Delete Empty Cells

A

alandh

I made a template for running some statistical data through. It ran slow
every time I tried saving and it wasn't until I tried e-mailing it that I
realized it was 75MB. It has 14 spreadsheets and all my data is contained
with in the first 20 columns and first 50 rows. the problem is that the rows
go down to ~65,000 and I can't seem to get rid of them. Selecting them alone
using ctl+shft+down makes the program not respond for a few minutes and when
I right click and select delete the program freezes altogether. I have tried
selecting smaller portions of the spreadsheets and it still doesn't seem to
lower the total amount of rows.

The spreadsheets were originally made in 2002 and now in 2007[Compatibility
Mode].

Any help would be much appreciated - especially considering I have people
waiting for this data, but cannot send it out.
 
A

alandh

Okay, I figured out how to run a Macro, but apparently there is an error in
the code you gave me. Its telling me that r.Clear is causing errors because
"Runtime error 1004: Cannot change merged part of a cell."



alandh said:
I'd like to think that I'm not that bad with computers - but I'm not a
programmer by any means. I just know how to do basic data input and run
formulas in excel files. What do I exactly do with that? How do I run it?


Gary''s Student said:
This may take a while to run:

Sub cleaner()
For Each r In ActiveSheet.UsedRange
If r.Value = "" Then
r.Clear
End If
Next
End Sub

but it should fix the problem.
--
Gary''s Student - gsnu200857


alandh said:
I made a template for running some statistical data through. It ran slow
every time I tried saving and it wasn't until I tried e-mailing it that I
realized it was 75MB. It has 14 spreadsheets and all my data is contained
with in the first 20 columns and first 50 rows. the problem is that the rows
go down to ~65,000 and I can't seem to get rid of them. Selecting them alone
using ctl+shft+down makes the program not respond for a few minutes and when
I right click and select delete the program freezes altogether. I have tried
selecting smaller portions of the spreadsheets and it still doesn't seem to
lower the total amount of rows.

The spreadsheets were originally made in 2002 and now in 2007[Compatibility
Mode].

Any help would be much appreciated - especially considering I have people
waiting for this data, but cannot send it out.
 
G

Gary''s Student

This macro will not work if any of the cells are Merged.
--
Gary''s Student - gsnu200857


alandh said:
Okay, I figured out how to run a Macro, but apparently there is an error in
the code you gave me. Its telling me that r.Clear is causing errors because
"Runtime error 1004: Cannot change merged part of a cell."



alandh said:
I'd like to think that I'm not that bad with computers - but I'm not a
programmer by any means. I just know how to do basic data input and run
formulas in excel files. What do I exactly do with that? How do I run it?


Gary''s Student said:
This may take a while to run:

Sub cleaner()
For Each r In ActiveSheet.UsedRange
If r.Value = "" Then
r.Clear
End If
Next
End Sub

but it should fix the problem.
--
Gary''s Student - gsnu200857


:

I made a template for running some statistical data through. It ran slow
every time I tried saving and it wasn't until I tried e-mailing it that I
realized it was 75MB. It has 14 spreadsheets and all my data is contained
with in the first 20 columns and first 50 rows. the problem is that the rows
go down to ~65,000 and I can't seem to get rid of them. Selecting them alone
using ctl+shft+down makes the program not respond for a few minutes and when
I right click and select delete the program freezes altogether. I have tried
selecting smaller portions of the spreadsheets and it still doesn't seem to
lower the total amount of rows.

The spreadsheets were originally made in 2002 and now in 2007[Compatibility
Mode].

Any help would be much appreciated - especially considering I have people
waiting for this data, but cannot send it out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top