Salut Roussette,
Bonsoir Andréa,
fichier protégé, pas pu tester! Sans garantie, je déteste ça!
Cette macro devrait (normalement) copier toute ligne dont le statut passe à 'Terminé" ou "Annulé" vers 'ARCH_TRANS' avec tri de cette dernière et effacement de la ligne de 'SAISIE_TR....'.
A tester!
Si un traitement de masse est préféré avec commande par bouton ou autre, il faudra la modifier, évidemment!
Private Sub Worksheet_Change(ByVal Target As Range)
'
If Not Intersect(Target, Range("K3:K" & Cells(Rows.Count, 11).End(xlUp).Row)) Is Nothing Then
If Target.Value = "Terminé" Or Target.Value = "Annulé" Then
Application.EnableEvents = False
Application.ScreenUpdating = False
'
With Worksheets("ARCH_TRANS")
iRow = .Cells(Rows.Count, 1).End(xlUp).Row + 1
.Range("A" & iRow & ":O" & iRow).Value = Range("A" & Target.Row & ":O" & Target.Row).Value
.Range("A" & iRow & ":O" & iRow).Sort key1:=.Range("A3"), order1:=xlAscending, Orientation:=xlTopToBottom
End With
Rows(Target.Row).Delete shift:=xlUp
'
Application.ScreenUpdating = True
Application.EnableEvents = True
End If
End If
'
End Sub
A+