Sub Mise_à_Jour2()
Dim a, code, n As Byte, c, cel As Range
a = Array(Feuil2, Feuil1) 'CodeNames des feuilles à traiter
code = Array("D712", "D727") 'codes à traiter
Application.ScreenUpdating = False
For n = 0 To UBound(a)
For Each c In code
Set cel = a(n).[B:B].Find(c, , xlValues, xlWhole, , xlPrevious)
If Not cel Is Nothing Then
cel(2).EntireRow.Insert 'ligne entière
cel.Resize(, 12).Copy cel(2)
cel.Resize(, 12) = cel.Resize(, 12).Value 'supprime les formules
cel(2, 4) = IIf(n, a(0).Cells(cel(2).Row, "M"), DateAdd("yyyy", 1, cel(2, 4)))
cel(2, 5) = IIf(n, 0, DateAdd("yyyy", 1, cel(2, 5)))
End If
Next
Next
End Sub