I sat around and thought about it and I wrote something.. but it is very intermittenet. If I run it once.. it misses some duplicates.. but if I run it again it catches them.. as well as a third time.. let me know what you think of the code.
also bear in mind that I wrote this by hand.. I am unable to copy and paste the code directly..
Sub Alert()
begingRow = 2
endRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowCnt = begingRow to endRow
I = 1
beginRow2 = RowCnt + 1
endRow2 = Cells(Rows.Count, "A").End(xlUp).Row
rowKVal = Cells(RowCnt, "K").Value
rowMVal = Cells(RowCnt, "M").Value
rowOVal = Cells(RowCnt, "O").Value
rowPVal = Cells(RowCnt, "P").Value
rowAColor = Cells(RowCnt, "A").Interior.ColorIndex
If InStr(rowOVal, "gnome") > 0 or InStr(rowPVal, "gnome") > 0 Then
Rows(RowCnt).EntireRow.Delete
End If
If InStr(rowOVal, "screensaver") > 0 or InStr(rowPVal, "screensaver") > 0 Then
Rows(RowCnt).EntireRow.Delete
End If
If InStr(rowOVal, "gnome-screensaver") > 0 or InStr(rowPVal, "gnome-saver") > 0 Then
Rows(RowCnt).EntireRow.Delete
End If
If rowAColor = 16 Then
Rows(RowCnt).EntireRow.Delete
End If
For RowCnt2 = beginRow2 to endRow2
If InStr(Cells(RowCnt2, "K"), rowKVal) > 0 and InStr(Cells(RowCnt2, "M"), rowMVal) > 0 Then
If Cells(RowCnt2, "S").Value > 0 Then
I = I + Cells(RowCnt2, "S").Value - 1
Else
I = I + 1
End If
Rows(RowCnt2).EntireRow.Delete
EndIf
Next RowCnt2
Cells(RowCnt, "S").Value = I
Next RowCnt
End Sub