re
lol ! on va y arriver... Pas facile sans avoir le vrai fichier
essaie ceci :
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long, ligne As Long
Dim wb_dep As String
Application.ScreenUpdating = False
If Target.Count > 1 Then Exit Sub
wb_dep = ActiveWorkbook.Name
'Copie des lignes avec conditions
ligne = Sheets("REX").Range("K" & Sheets("REX").Rows.Count).End(xlUp).Row
If ligne < 9 Then ligne = 9 Else ligne = ligne + 1
For i = 9 To Workbooks(wb_dep).Sheets(1).Range("A" & Workbooks(wb_dep).Sheets(1).Rows.Count).End(xlUp).Row
If Workbooks(wb_dep).Sheets(1).Range("K" & i) = "ACTIF" Then
Workbooks(wb_dep).Sheets(1).Range("A" & i & ":U" & i).Copy
Workbooks(wb_dep).Sheets(2).Range("A" & ligne).PasteSpecial Paste:=xlValues
ligne = ligne + 1
End If
Next i
With Sheets("REX")
.Range("A5:U" & .Range("B" & .Rows.Count).End(xlUp).Row).RemoveDuplicates Columns:=(2), Header:=xlNo
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub