Option Explicit
Sub test()
Dim i As Long, Message
Range("B2:D2") = ""
For i = 2 To 4
Message = InputBox("Combien voulez-vous de mot FONT")
If Message = 1 Then
Cells(2, 2) = 1
If IsNumeric(Cells(i, 2)) = False Then
Exit Sub
End If
ElseIf Message = 2 Then
Cells(2, 2) = 1
Cells(2, 3) = 1
If IsNumeric(Cells(i, 2)) = False Then
Exit Sub
End If
ElseIf Message = 3 Then
Cells(2, 2) = 1
Cells(2, 3) = 1
Cells(2, 4) = 1
If IsNumeric(Cells(i, 2)) = False Then
Exit Sub
End If
Else
MsgBox "Veuillez mettre un nombre entre 1 et 3"
End If
Exit For
Next i
End Sub