Sub Macro5()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
annee = Range("z_date")
dep = Format(Range("z_dep"), "000")
l = 2
With Sheets("Feuil1")
While .Cells(l, 2) <> ""
If .Cells(l, 2) = dep And Year(.Cells(l, 6)) < annee Then
l2 = l2 + 1
x1 = Replace(Range(Cells(l, 1), Cells(l, 6)).Address, "$", "")
x2 = Replace(Worksheets("feuil4").Cells(l2, 17).Address, "$", "")
Worksheets("feuil1").Range(x1).Copy Destination:=Worksheets("feuil2").Range(x2)
End If
l = l + 1
Wend
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub