Private Sub Worksheet_Change(ByVal Target As Range)
Dim t, a$, resu(), i&, j&, x, k&, n&
Application.EnableEvents = False 'désactive les évènements
With UsedRange
t = .Columns(1).Resize(, 2) 'matrice, plus rapise
a = .Columns(2).Address
ReDim resu(1 To Evaluate("SUM(IF(ISNUMBER(" & a & "),INT(" & a & ")))"), 1 To 1)
For i = 1 To UBound(t)
j = Int(Val(t(i, 2)))
x = t(i, 1)
For k = 1 To j
n = n + 1
resu(n, 1) = x
Next k, i
If n Then
.Columns(6).Resize(n) = resu 'restitution
.Columns(6).Resize(n).Interior.ColorIndex = 6 'jaune
End If
.Cells(n + 1, 6).Resize(Rows.Count - n - .Row + 1).Clear 'RAZ en dessous
End With
With UsedRange: End With 'actualise la barre de défilement verticale
Application.EnableEvents = True 'réactive les évènements
End Sub