Sub DeleteAllEmptyRows()Dim LastRowIndex As IntegerDim RowIndex As IntegerDim UsedRng As Range Set UsedRng = ActiveSheet.UsedRangeLastRowIndex = UsedRng.Row - 1 + UsedRng.Rows.CountApplication.ScreenUpdating = False For RowIndex = LastRowIndex To 1 Step -1If Application.CountA(Rows(RowIndex)) = 0 ThenRows(RowIndex).DeleteEnd IfNext RowIndex Application.ScreenUpdating = TrueEnd Sub
Sub
DeleteAllEmptyRows()
Dim
LastRowIndex As
Integer
RowIndex As
UsedRng As
Range
Set
UsedRng = ActiveSheet.UsedRange
LastRowIndex = UsedRng.Row - 1 + UsedRng.Rows.Count
Application.ScreenUpdating = False
For
RowIndex = LastRowIndex To
1 Step
-1
If
Application.CountA(Rows(RowIndex)) = 0 Then
Rows(RowIndex).Delete
End
Next
RowIndex
Application.ScreenUpdating = True