Private Sub Worksheet_change(ByVal target As Range)
If target.Column = 3 Or target.Column = 4 Then
Rowfin = Range("C65536").End(xlUp).Row + 1
' mise à jour formule en colonne F (comme si on tirait la formule du dessus)
Range("F" & target.Row - 1).AutoFill Destination:=Range("F" & target.Row - 1 & ":F" & target.Row), Type:=xlFillDefault
'modification du tri : une seule passe tri selon colonne C puis colonne D
Range("A2:G" & Rowfin).Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("D2") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
End If
End Sub