Perhaps...
Sub DeleteRows2()
Dim lLastRow&, n&, lCalcMode&
Dim wks As Worksheet
Const sCheck$ = "F1PPM60601" '//edit to suit
Const lNoCalc = -4135
Const lStartRow& = 9 '//edit to suit
Set wks = ActiveWorkbook.Sheets("PM4") '//edit to suit
With Application
lCalcMode = .Calculation: .Calculation = lNoCalc
.ScreenUpdating = False
End With
On Error GoTo ErrExit
With wks
lLastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
For n = lLastRow To lStartRow Step -1
If sCheck < .Cells(n, 1).Value Then .Rows(n).Delete
Next 'n
End With
ErrExit:
With Application
.Calculation = lCalcMode: .ScreenUpdating = True
End With
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion