Private Sub Worksheet_Change(ByVal Target As Range)
Dim rowTarget As Long
If Not Application.Intersect(Target, Range("a7:g7")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Range("a8:g1500").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Range("a6:g7"), Unique:=False
Application.Goto Range("a1"), Scroll:=True
Target.Activate
ElseIf Not (Intersect(Target, Range("K:K")) Is Nothing) Then
Dim lig As Long, derligne As Long
If Target.Value = "OUI" Then
With Sheets("Commandes Expédiées")
derligne = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
lig = Target.Row
While Cells(lig, 1) = ""
lig = lig - 1
Wend
.Cells(derligne, 1) = Cells(Target.Row, 1)
.Cells(derligne, 2) = Cells(Target.Row, 2)
.Cells(derligne, 3) = Cells(Target.Row, 3)
.Cells(derligne, 5) = Cells(Target.Row, 4)
End With
rowTarget = Target.Row
Application.EnableEvents = False
With Sheets("Base")
.Cells(rowTarget, "G") = ""
.Cells(rowTarget, "H") = ""
.Cells(rowTarget, "I") = ""
.Cells(rowTarget, "J") = ""
End With
Application.EnableEvents = True
End If
End If
End Sub