Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Target.Cells(1, 1)
If Target.Offset(1) <> "Allocation" [COLOR="Red"]And Target.Offset(1) <> "CHEVAUX"[/COLOR] Then Exit Sub
Dim lig&, derlig&, w As Worksheet, cel As Range
lig = Target.Row + 2
derlig = [COLOR="red"]Columns("I")[/COLOR].Find("Allocation", After:=[COLOR="red"]Cells(Target.Row + 1, "I")[/COLOR], LookIn:=xlValues).Row - 2
If derlig < lig Then derlig = 65536
Rows(lig & ":" & derlig).Clear 'vide la plage de recopie
If [COLOR="red"]Cells(Target.Row, "I") = "" Or Cells(Target.Row, "N") = ""[/COLOR] Then Exit Sub
Application.ScreenUpdating = False
On Error Resume Next
For Each w In Workbooks("2008.xls").Worksheets
If Err Then MsgBox "Ouvrez le fichier '2008.xls' !!": Exit Sub
For Each cel In w.Range("N2", w.Range("N65536").End(xlUp))
If [COLOR="red"]cel = Cells(Target.Row, "I") And cel.Offset(, 6) = Cells(Target.Row, "N")[/COLOR] Then
cel.EntireRow.Copy Rows(lig)
If lig = derlig Then MsgBox "Dernière ligne disponible !": GoTo 1
lig = lig + 1
End If
Next
Next
1 Rows(Target.Row + 2 & ":" & derlig).WrapText = False 'évite les retours à la ligne
End Sub