1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Sub TRONCON()
Dim dlgR As Integer, dlgi As Integer
Set sh = Worksheets("Ligne")
dlgi = Sheets("Ligne").Range("A" & Rows.Count).End(xlUp).Row
dlgR = Sheets("troncon").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To dlgi
With Sheets("Ligne")
sh.Range("A3:A" & i).Copy Destination:=Sheets("troncon").Range("A" & dlgR + 1)
sh.Range("B3:B" & i).Copy Destination:=Sheets("troncon").Range("B" & dlgR + 1)
sh.Range("B3:B" & i).Copy Destination:=Sheets("troncon").Range("C" & dlgR + 1)
sh.Range("C3:C" & i).Copy Destination:=Sheets("troncon").Range("D" & dlgR + 1)
sh.Range("F3:F" & i).Copy Destination:=Sheets("troncon").Range("E" & dlgR + 1)
sh.Range("G3:G" & i).Copy Destination:=Sheets("troncon").Range("G" & dlgR + 1)
sh.Range("G3:G" & i).Copy Destination:=Sheets("troncon").Range("H" & dlgR + 1)
sh.Range("E3:E" & i).Copy Destination:=Sheets("troncon").Range("I" & dlgR + 1)
End With
Next i
End Sub |
Partager