View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming
Mike Tomasura Mike Tomasura is offline
external usenet poster
 
Posts: 32
Default help delete blank rows

try this

Private Sub CommandButton1_Click()

For x = 1 To 2000
If Range("A" & x) = "" Then
Range("A" & x).Select
Selection.Delete Shift:=xlUp
x = x - 1
y = y + 1
If y = 20 Then Exit For
Else
y = 0
End If
Next x

End Sub


"Cletus Stripling" wrote in message
...
I have a spreadsheet with a blank row between each row of good data. What

is
the best way to quickly eliminate all these blanks?

Could this be easily done?

Sampel Data

Col A
John
blank
Sue
blank
*
*
*
Kim
blank
Sally