1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub Composer()
Dim i&, a As Variant, n&, x&
With Feuil1
For i = 3 To 24 Step 20
For Each a In Array("Nom", "Nominale", "Unités", "Réels", "Eval")
For n = 1 To 16 Step 6
.Cells(i + 1, n + x) = a
Next n
x = x + 1
Next a
x = 0
Next i
.Cells(3, 1) = "DEFAUT PHASE": .Range(.Cells(3, 1), .Cells(3, 5)).Merge: .Range(.Cells(3, 1), .Cells(3, 5)).HorizontalAlignment = xlCenter
.Cells(3, 7) = "DEFAUT HOMOPOLAIRE": .Range(.Cells(3, 7), .Cells(3, 11)).Merge: .Range(.Cells(3, 7), .Cells(3, 11)).HorizontalAlignment = xlCenter
.Cells(3, 13) = "CYCLE REENCLENCHEUR": .Range(.Cells(3, 13), .Cells(3, 17)).Merge: .Range(.Cells(3, 13), .Cells(3, 17)).HorizontalAlignment = xlCenter
.Cells(23, 1) = "DEFAUT DOUBLE": .Range(.Cells(23, 1), .Cells(23, 5)).Merge: .Range(.Cells(23, 1), .Cells(23, 5)).HorizontalAlignment = xlCenter
.Cells(23, 7) = "TEST GRADIN": .Range(.Cells(23, 7), .Cells(23, 11)).Merge: .Range(.Cells(23, 7), .Cells(23, 11)).HorizontalAlignment = xlCenter
.Cells(23, 13) = "RSE": .Range(.Cells(23, 13), .Cells(23, 17)).Merge: .Range(.Cells(23, 13), .Cells(23, 17)).HorizontalAlignment = xlCenter
End With
End Sub |
Partager