Sub GenererCertifs_C()
Dim i&, t, ws As Worksheet
Set ws = Feuil6 'ici mettre le codename de la bonne feuille
Application.ScreenUpdating = False
ws.Columns(1).Clear: ws.Columns(1).ColumnWidth = 117.86
With Sheets("Résulat_formation") ' mettre le nom de la bonne feuille
j = ws.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To .Cells(Rows.Count, 1).End(3).Row Step 2
t = .Cells(i, 1).Resize(2, 10)
'1er certif
[CERTIFB].Item(10) = t(1, 10)
[CERTIFB].Item(14) = t(1, 3)
[CERTIFB].Item(16) = "a satisfait à la filière de Formation du cours de: " & t(1, 1)
If Len(t(1, 9)) > 1 Then
[CERTIFB].Item(18) = VBA.format(t(1, 9), """Avec: ""0.00%")
End If
'2ième certif
[CERTIFB].Item(33) = t(2, 10)
[CERTIFB].Item(37) = t(2, 3)
[CERTIFB].Item(39) = "a satisfait à la filière de Formation du cours de: " & t(2, 1)
If Len(t(2, 9)) > 1 Then
[CERTIFB].Item(41) = VBA.format(t(2, 9), """Avec: ""0.00%")
[CERTIFB].Copy ws.Cells(j, 1)
End If
Application.CutCopyMode = False
j = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1
Erase t
Next
End With
End Sub