View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Delete Empty Rows Macro

Sub DeleteEmptyRows()
''only if entire row is blank
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
End If
Next R
End Sub


Gord Dibben MS Excel MVP

On Thu, 21 Aug 2008 19:57:02 -0700, yepiknowiam
wrote:

I have been looking for a macro that will delete any empty row. This
spreadsheet I work with generally has 3-4 empty rows after each section.

It doesn't have to be complex.

Thanks.