View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Otero Tim Otero is offline
external usenet poster
 
Posts: 20
Default Deleteing Blank Rows

The below is John Walkenbach's code for doing this. I usually make it a
private sub and call it when needed.

Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub tim"dayton" wrote in message
...
| In my macro I need to delete rows that are blank down to the end of the
| file. The file's will not always be the same. What would the code be for
| this?
|
| T.I.A.
|
|