Deleting thousands of blank rows

  • Thread starter Thread starter NRG
  • Start date Start date
N

NRG

How do I delete thousands of blank rows to make my Excel
spreadsheet smaller in size? It is too large a file for my
disk to hold. I have been deleting thousands at a time,
but they just seem to be replaced with thousands more
empty rows. Can anyone help?
 
-----Original Message-----
How do I delete thousands of blank rows to make my Excel
spreadsheet smaller in size? It is too large a file for my
disk to hold. I have been deleting thousands at a time,
but they just seem to be replaced with thousands more
empty rows. Can anyone help?
.


Are they blank rows in between you data if so can create a
macro to delete them

ALT F11
Type

Sub DeleteRows()
Dim myRow As Long
With Worksheets("DrHygProd")
For myRow = .Cells.SpecialCells
(xlCellTypeLastCell).Row To 1 Step -1
If Application.CountA(.Rows(myRow)) = 0 Then
.Rows(myRow).Delete
End If
Next myRow
End With
End Sub

If you are talking about the blank rows below all or you
info. I think your stuck. Just have to save to a zip or cd.
Hope this gets you going in the right direction.

Jennifer
 
If 100 rows are used, and if you want to delete all the rows starting from
101, just type 101:65536 in the name box and press enter.

Right-click on the selection, select delete.

The same method can be applied can be applied to columns also ( specify F:IV
etc.)

Regards,
Murthy
 
If I understand your question correctly, then you misunderstand Excel.
A worksheet is 65,536 rows by 256 columns with or without data. Used
cells are stored as a linked list, unused cells do not take up space.

Jerry
 
Back
Top