Sub Bouton1_Clic()
Dim Lg, Rep, texte
If Selection.Rows.Count > 1 Or Selection.Column <> 1 Or Selection.Row = 1 Or Selection = "" Then
MsgBox ("SELECTIONNER UNE SEULE CELLULE (non-vide) EN COLONNE A")
Exit Sub
End If
Lg = ActiveCell.Row
' saisie du nombre de lignes à ajouter
Do
Rep = Application.InputBox("Combien de lots à ajouter ?", "Ajouter lots", 1, Type:=1)
If Rep = False Then Exit Sub
Loop While Rep = ""
' saisie du texte à ajouter en colonne A dans les nouvelles lignes
Do
texte = Application.InputBox("Entrer le texte à mettre dans la (les) nouvelle cellule(s)")
If texte = False Then Exit Sub
Loop While texte = ""
Rows(Lg).Copy
Range(Rows(Lg + 1), Rows(Lg + Rep)).Insert
Application.CutCopyMode = False
On Error Resume Next
Range(Rows(Lg + 1), Rows(Lg + Rep)).SpecialCells(xlCellTypeConstants, 23).ClearContents
' ajout du nouveau texte en colonne A + incrémentation
For i = 1 To Rep
Cells(Lg + i, 1) = texte & " " & i
Next i
End Sub