K
Kirk P.
I've got this code to automate the selection and deletion of any rows that
contain a 0 (zero) in column AA. The code works fine, but rather slowly.
Takes almost 1 minute to delete the zero rows in 1 worksheet, and I want to
apply this code to ALOT of worksheets.
Is there anything that can be done to speed this up?
Dim FirstRow, LastRow, CurRow As Long
Dim col As String
FirstRow = 5
col = "AA"
LastRow = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Application.ScreenUpdating = False
For CurRow = LastRow To FirstRow Step -1
If ActiveSheet.Cells(CurRow, col) = 0 Then Rows(CurRow).Delete
Next CurRow
MsgBox "Rows deleted!", vbInformation, "Status"
contain a 0 (zero) in column AA. The code works fine, but rather slowly.
Takes almost 1 minute to delete the zero rows in 1 worksheet, and I want to
apply this code to ALOT of worksheets.
Is there anything that can be done to speed this up?
Dim FirstRow, LastRow, CurRow As Long
Dim col As String
FirstRow = 5
col = "AA"
LastRow = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Application.ScreenUpdating = False
For CurRow = LastRow To FirstRow Step -1
If ActiveSheet.Cells(CurRow, col) = 0 Then Rows(CurRow).Delete
Next CurRow
MsgBox "Rows deleted!", vbInformation, "Status"