Sub Copie()
Dim Sh As Worksheet, C As Range, Plage As Range, AncCode As Variant, Ligne As Variant
Set Sh = Workbooks("TCD Produits livrés et repris.xlsx").Sheets("TCD")
With Sh
Set Plage = .Range("D5", .Cells(.Rows.Count, 4).End(xlUp))
End With
With ThisWorkbook.Sheets("Stat AFD+V.F")
For Each C In Plage
AncCode = Application.VLookup(C.Value, ThisWorkbook.Sheets("Poches Bqts").[B:C], 2, 0)
If IsNumeric(AncCode) Then
Ligne = Application.Match(AncCode, .[H:H], 0)
If IsNumeric(Ligne) Then
.Cells(Ligne, 14).Value = Sh.Cells(C.Row, 7)
.Cells(Ligne, 16).Value = Sh.Cells(C.Row, 8)
.Cells(Ligne, "T").Value = Sh.Cells(C.Row, 5)
.Cells(Ligne, "V").Value = Sh.Cells(C.Row, 6)
End If
End If
Next C
End With
End Sub