Delete Unused (4000) Rows
use something like:
With Sheets("sheet2")
.UsedRange
End With
If you've got a few sheets with consecutive numbers, you could try:
For i = 1 To Sheets.Count
With Sheets("sheet" & i)
.UsedRange
End With
Next
Regards
Trevor
"VexedFist" wrote in message
oups.com...
Help,
I have a Large workbook running multiple Macros to import, compare
and generate reports.
The Problem is that after all is said and done I endup with a workseet
that has about 5000 rows, when only maybe 1000 have data in them. The
other 4000 are blank, I nned to remove these as they increase the size
of the workbook exponentially. Since this worksheet has between 7 and
10 worksheets with the same problem.
Since I am deleting alout of rows I am also worried about the Macro
slowing down too much.
I already have Application.ScreenUpdating = False
Any Ideas or suggestions.
|