Bonsoir à tous,
A tester sur une copie de ta feuille :
Option Explicit
Sub supprime()
Dim a, e, i As Long, txt As String, rng As Range
Dim dico1 As Object, dico2 As Object
Set dico1 = CreateObject("Scripting.Dictionary")
dico1.CompareMode = 1
Set dico2 = CreateObject("Scripting.Dictionary")
dico2.CompareMode = 1
For Each e In Array("jeans", "kiwi")
dico1(e) = Empty
Next
'la 1ère feuille dans le classeur
With Sheets(1).Range("a1").CurrentRegion
a = .Value
For i = 2 To UBound(a, 1)
If dico1.exists(a(i, 3)) Then
txt = Join$(Array(a(i, 1), a(i, 2)), "|")
dico2(txt) = Empty
End If
Next
For i = 2 To UBound(a, 1)
txt = Join$(Array(a(i, 1), a(i, 2)), "|")
If Not dico2.exists(txt) Then
If rng Is Nothing Then
Set rng = .Rows(i)
Else
Set rng = Union(rng, .Rows(i))
End If
End If
Next
End With
Application.ScreenUpdating = False
'If Not rng Is Nothing Then rng.EntireRow.Delete
If Not rng Is Nothing Then
rng.Select 'selectionne
Else
MsgBox "Pas de données à supprimer"
End If
Set dico1 = Nothing: Set dico2 = Nothing
Set rng = Nothing
Application.ScreenUpdating = True
End Sub
Te voilà avec une feuille source amputée de certaines lignes.
klin89