Option Explicit
Sub Transfert()
Dim i&
Dim Plg As Range, PLg_EnTete As Range
Dim T_EnTete As Variant, T_Data As Variant, T_Report As Variant
Application.EnableEvents = False
Application.ScreenUpdating = False 'désactive mise à jour écran
With Sheets("Bon de cde")
Set Plg = .Range(.Cells(8, 1), .Cells(.Rows.Count, 1).End(3).Offset(, 3))
T_EnTete = .Range("A1:D5")
End With
T_Data = Plg
ReDim T_Report(1 To UBound(T_Data, 1), 1 To 6)
For i = LBound(T_Data, 1) To UBound(T_Data, 1)
T_Report(i, 1) = T_EnTete(1, 4) 'n° bon de commande
T_Report(i, 2) = CDate(T_EnTete(3, 4)) 'date de demande
T_Report(i, 5) = T_EnTete(5, 2) 'N° Affaire
' 'On boucle sur les colonnes du tableau T_Report
T_Report(i, 3) = CStr(T_Data(i, 1)) 'ref interne
T_Report(i, 4) = T_Data(i, 2) 'Désignation produit
T_Report(i, 6) = T_Data(i, 3) 'quantité
Next i
Sheets("Suivi cde").Cells(Rows.Count, 1).End(3)(2).Resize(UBound(T_Report, 1), UBound(T_Report, 2)) = T_Report
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub