Re,
Merci pour ton retour,
Je ne veux prendre que les lignes sélectionnées.
Peut-être ainsi....(si les lignes sont sélectionnées par bloc)....
Sub Test()
Dim tablo, lignedeb, lignefin
Application.ScreenUpdating = False
With selection '.................................selectionner les lignes
lignedeb = .Row '...............................première ligne
lignefin = lignedeb + .Rows.Count - 1 '.........dernière ligne
tablo = Sheets("Détail besoin").Range("A" & lignedeb & ":Q" & lignefin) '..tableau de données
End With
With Sheets("Usiné")
.Activate
For i = 1 To UBound(tablo, 1)
If tablo(i, 2) <> "" Then
a = tablo(i, 15) - 1
lgn = .Range("D" & Rows.Count).End(xlUp).Row + 1
For j = 4 To 18
.Range(Cells(lgn, j), Cells(lgn + a, j)) = tablo(i, j - 1)
Next j
End If
Next i
End With
End Sub
Cordialement,