bonjour,
Voici le problème que je rencontre je désire supprimer la ligne entière dont la colonne ne contient pas "sent-a" et "CxlRep".
Voici la macro que j'ai écrit pour le critère "sent-a"
Set Plage = Range("K1:K" & Range("K1").End(xlDown).Row)
For I = Plage.Cells.Count To 2 Step -1
If Plage.Cells(I).Value <> "Sent-a" Then
Plage.Cells(I).EntireRow.Delete
End If
Next
Mais quand je veux rajouter "CxlRep", la macro bug dessus
Set Plage = Range("K1:K" & Range("K1").End(xlDown).Row)
For I = Plage.Cells.Count To 2 Step -1
If Plage.Cells(I).Value <> "Sent-a" or "CxlRep" Then
Plage.Cells(I).EntireRow.Delete
End If
Next
Je ne vois pas pourquoi
P.S : c'est juste un bout d'une macro, j'ai copier l'intégralité mais juste l'essentielle par rapport a mon probleme.
Voici le problème que je rencontre je désire supprimer la ligne entière dont la colonne ne contient pas "sent-a" et "CxlRep".
Voici la macro que j'ai écrit pour le critère "sent-a"
Set Plage = Range("K1:K" & Range("K1").End(xlDown).Row)
For I = Plage.Cells.Count To 2 Step -1
If Plage.Cells(I).Value <> "Sent-a" Then
Plage.Cells(I).EntireRow.Delete
End If
Next
Mais quand je veux rajouter "CxlRep", la macro bug dessus
Set Plage = Range("K1:K" & Range("K1").End(xlDown).Row)
For I = Plage.Cells.Count To 2 Step -1
If Plage.Cells(I).Value <> "Sent-a" or "CxlRep" Then
Plage.Cells(I).EntireRow.Delete
End If
Next
Je ne vois pas pourquoi
P.S : c'est juste un bout d'une macro, j'ai copier l'intégralité mais juste l'essentielle par rapport a mon probleme.