I think I might know what that is Les. I thought about such a situation, but
your example data didn't have such a situation.
Try this version
Sub Test()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 2 Step -1
If ActiveSheet.Evaluate("SUMPRODUCT(--(A1:A1000=A" & i & _
"),--(D1:D1000=D" & i & "))") 1 Then
Rows(i).Delete
End If
Next i
End Sub
If that doesn't work, click on my name in the posting header and you will
get my email address, which should be modified as in my signature.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Les Stout" wrote in message
...
Hi Bob, aftyer checking, i find that it is deleting some lines that it
should not be. If i could get an e-mail address i could send you the
spreadsheet, it might help explain better.
Les Stout
*** Sent via Developersdex http://www.developersdex.com ***