Bonjour Nico21, James
Sub ArchiveNew()
Dim derDat, derArc
Dim cptDat
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
derDat = Cells(Rows.Count, 2).End(xlUp).Row
If derDat > 3 Then
For cptDat = derDat To 4 Step -1
If Cells(cptDat, 18) = "OUI" Then
derArc = Feuil2.Cells(Rows.Count, 2).End(xlUp).Row + 1
Feuil1.Range(Cells(cptDat, 2), Cells(cptDat, 19)).Copy Destination:=Feuil2.Cells(derArc, 2)
End If
Next
For cptDat = derDat To 4 Step -1
If Cells(cptDat, 18) = "OUI" Then
Feuil1.Rows(cptDat).Delete shift:=xlUp
End If
Next
End If
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
J'en étais au même résultat, par contre je fais une copie de la ligne et dans une 2ème boucle je supprime la ligne, parce que bizarrement lors de mes essais la procédure s'arrêtait à la 1ère suppression ?