Public Sub ProcessData()
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = iLastRow to 1 Step -1
If ( .Cells(i, "A").Value = "Monday" Or _
.Cells(i, "A").Value = "Tuesday" Or _
.Cells(i, "A").Value = "Wednesday") And _
.Cells(i,"F").Value <> "NOT" Then
.Rows(i).Delete
Next i
End With
End Sub

Signature
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Hi guys,
>
[quoted text clipped - 13 lines]
>
> Many Thanks,
Rodney - 26 Sep 2007 13:20 GMT
Thanks for that Bob.
The macro makes sense but when i try and run it i get the following error
message:
'Compile Error: Next without For'
Any ideas how to sort that issue out?
Many thanks
> Public Sub ProcessData()
> Dim i As Long
[quoted text clipped - 32 lines]
> >
> > Many Thanks,
Dave Peterson - 26 Sep 2007 13:41 GMT
Public Sub ProcessData()
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = iLastRow to 1 Step -1
If ( .Cells(i, "A").Value = "Monday" Or _
.Cells(i, "A").Value = "Tuesday" Or _
.Cells(i, "A").Value = "Wednesday") And _
.Cells(i,"F").Value <> "NOT" Then
.Rows(i).Delete
End If '<--- added
Next i
End With
End Sub
> Thanks for that Bob.
>
[quoted text clipped - 50 lines]
> > >
> > > Many Thanks,

Signature
Dave Peterson