Originally Posted by
Simon Lloyd
I have written some code to help another person, the criteria was to compare Range_A against Range_B and delete any matches in Range_A that are found in Range_B
My questions are (as i havent posted this solution yet) is this a safe way to do it, am i missing something?[vba]
Sub DelDuplicate()
Dim Rng As Range, Rng2 As Range, Str
Dim MyCell
Str = MyCell
Set Rng = Range("Range_A")
Set Rng2 = Range("Range_B")
Application.ScreenUpdating = False
For Each Str In Rng
If Not IsError(Application.Match(Str, Rng2, 0)) Then
Str.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
[/vba]Regards,
Simon