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
| Sub tt()
Set fProd = ThisWorkbook.Worksheets("Prod")
Set fNew = ThisWorkbook.Worksheets("New")
Set fDestination = Sheets.Add(After:=Sheets(Sheets.Count))
DerniereCol = fProd.Cells(1, Columns.Count).End(xlToLeft).Column
coldest = 1
For i = 1 To DerniereCol
fProd.Columns(i).Copy fDestination.Cells(1, coldest)
fNew.Columns(i).Copy fDestination.Cells(1, coldest + 1)
fDestination.Cells(1, coldest + 2).Value = "Coucou"
coldest = coldest + 3
Next
MsgBox "Copie terminée"
End Sub |
Partager