I have used this macro to find part of a string to delete the whole row. This particualr macro looks for the first six letters SrvDsk and deletes the entire row. I didn't need to look for duplicates as such if there are duplicates, then this macro will skip the second row. A simple way to deal with duplicates would be to include
R=R-1 just before Next R
Sub ParseData()
Dim R As Long
Dim C As Range
Dim N As Long
Dim Rng As Range
On Error GoTo EndMacro
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
If Selection.Rows.Count > 1 Then
Set Rng = Selection
Else
Set Rng = ActiveSheet.UsedRange.Rows
End If
For R = Rng.Rows.Count To 1 Step -1
Range("B" & R).Select
lft = Left(Selection.Value, 3)
If lft = "SrvDsk" Then
Rng.Rows(R).EntireRow.Delete
End If
Next R
EndMacro:
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub