Does anyone can teach me how to modify the code below to allow me to delete blank rows in table "Table1" and range "Purpose"? I want to delete those blank rows from the last row until reaching a non-empty row.
</PRE>
Is it possible? Thank you!
</PRE>
Best regards,
lolo^^
</PRE>
</PRE>
Is it possible? Thank you!
</PRE>
Rich (BB code):
Sub DelEmptyRows()
Dim i As Long, iLimit As Long
iLimit = ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
For i = iLimit To 1 Step -1
If Application.CountA(Cells(i, 1).EntireRow) = 0 Then
Cells(i, 1).EntireRow.Delete
End If
Next i
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
iLimit = ActiveSheet.UsedRange.Rows.Count 'attempt to fix lastcell
ActiveWorkbook.Save
End Sub
Best regards,
lolo^^
</PRE>
Last edited: