Private Sub Worksheet_Change(ByVal Target As Range)
Dim t, limite&, rest(), n&, x, m, lig&
Application.EnableEvents = False
If Me.FilterMode Then Me.ShowAllData 'si la feuille est filtrée
t = Range("A1:B" & Range("A" & Rows.Count).End(xlUp).Row)
limite = Rows.Count - 1
ReDim rest(1 To limite, 1 To 1)
For n = 2 To UBound(t)
x = t(n, 1)
For m = 1 To Val(CStr(t(n, 2)))
lig = lig + 1
rest(lig, 1) = x
If lig = limite Then MsgBox "Limite de la feuille !", 48: GoTo 1
Next m, n
1 If lig Then [D2].Resize(lig) = rest
If lig < limite Then Range("D" & lig + 2 & ":D" & Rows.Count) = ""
With Me.UsedRange: End With 'actualise si nécessaire la barre de défilement verticale
Application.EnableEvents = True
End Sub