blank rows

P

phil2006

I have a table of data, every few rows one is blank, is there a program
that deletes blank rows?

Thanks
 
B

Bob Phillips

Sub DeleteRows()
Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count,"A").End(xlUp).Row
For i = iLastRow to 1 Step -1
If Application.CountA(Rows(i)) = 0 Then
Rows(i).Delete
End If
Next i
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Gord Dibben

Manually..........

Select Column A

F5>Special>Blanks>OK

Edit>Delete>Entire Rows>OK


Gord Dibben MS Excel MVP
 
Top