Attention à la Casse TOTO <>toto sinon écrireSub EssAi()
Dim i As Long
For i = Range("A65536").End(xlUp).Row To 2 Step -1
If Cells(i, 1) like "*Toto*" Then Rows(i).Delete
Next i
End Sub
Ou mettre en tête de ModuleSub EssAi()
Dim i As Long
For i = Range("A65536").End(xlUp).Row To 2 Step -1
If Cells(i, 1) like "*Toto*" or Cells(i, 1) like "*toto*" or Cells(i, 1) like "*TOTO*"Then Rows(i).Delete
Next i
End Sub
Option Compare Text
Voici le Maître Mot : RECHERCHE ...Voici ma recherche :
Et oui, c'est surtout que c'est un sujet très récurent ...Edit: Salut Jean-Noël Eh oui Bonne Habitude à prendre dès le départ ...mais il est nouveau...
If Not Evaluate("=ISERROR(SEARCH(""toto"", A" & i & "))") Then Rows(i).Delete
Bête question mais les Cells(i, 1) correspondent à la colonne A. Les as-tu adaptés à la colonne que tu souhaites (2 pour B, 3 pour C, etc.) ?Merci Dull mais cela ne fonctionne pas :-(
Option Compare Text
Sub EssAi()
Dim l As Long
For l = 2 To Cells(Rows.Count, "A").End(xlUp).Row
If Cells(l, "A") = "toto" Then Rows(l).ClearContents
Next
End Sub
Dim i As Long
Sheets("Réservé").Select
For i = Range("A1592").End(xlUp).Row To 808 Step -1
If Cells(i, 2) Like "Divers" Then Rows(i).Delete
Next i
With Sheets("Réservé")
For Lig = .Cells(.Rows.Count, 2).End(xlUp).Row To 802 Step -1
If .Cells(Lig, 2).Value = "Divers" Then .Rows(Lig).Delete
Next Lig
End With
Dim Lig&
With Sheets("Réservé")
For Lig = .Cells(Rows.Count, 2).End(xlUp).Row To 802 Step -1
If .Cells(Lig, 2) = "Divers" Then .Rows(Lig).Clearcontents
Next Lig
End With