Sub FormatProdstarSP()
Dim a As Integer
With Sheets("Feuil1")
a = .Range("A" & .Rows.Count).End(xlUp).Row 'dernière ligne
.Columns("A:B").Insert Shift:=xlToRight
With .Rows("1:1")
.ClearContents
.Font.Bold = False
.NumberFormat = "@"
End With
.Range("A1").Resize(a).FormulaR1C1 = "90P21302"
.Range("B1").FormulaR1C1 = "F000"
.Range("C1").FormulaR1C1 = "003200007080008080010176005100"
.Range("B2").Resize(a - 1).FormulaR1C1 = "D000"
.Range("H2").Resize(a - 1).FormulaR1C1 = "=RC[-2]*1000000"
.Columns("H:H").Copy
.Columns("F:F").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
.Columns("D:E").NumberFormat = "yyyymmdd"
.Columns("G:G").NumberFormat = "0000000000"
.Columns("F:F").NumberFormat = "00000000000000000"
.Columns("A:H").EntireColumn.AutoFit
.Columns("H:H").Delete Shift:=xlToLeft
.Range("A1").Activate
End With
ChDir "I:\Manufacturing\Prodstar"
ActiveWorkbook.SaveAs Filename:="I:\Information System\fp2ipt.seq", FileFormat _
:=xlTextPrinter, CreateBackup:=False
End Sub