Deleting Rows on condition & Long processing time
Hi J.P.,
Am Mon, 4 May 2015 10:42:36 -0700 (PDT) schrieb JeanPierre Charron:
modify strCheck to the expected string:
Sub DeleteRows()
Dim strCheck As String
Dim LRow As Long, i As Long
Dim varData As Variant
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
strCheck = "F1PPM60601"
With Sheets("PM4")
LRow = .Cells(Rows.Count, 1).End(xlUp).Row
varData = .Range("A2:A" & LRow)
For i = UBound(varData) To LBound(varData) Step -1
If strCheck < varData(i, 1) Then
Rows(i + 1).Delete
End If
Next
End With
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|