Private Sub Worksheet_Change(ByVal Target As Range)
Dim P As Range, prem&, der&, mini&, maxi&, d As Object, resu(), tablo, i&, n&
Set P = [A1].CurrentRegion.Columns(2) 'à adapter
prem = Val([E2]): der = Val([E3]) 'à adapter
mini = Application.Min(P)
maxi = Application.Max(P)
prem = IIf(prem > mini, prem, mini)
der = IIf(der > maxi, maxi, der)
Set d = CreateObject("Scripting.Dictionary")
tablo = P.Resize(, 2) 'matrice, plus rapide, au moins 2 éléments
'---liste des numéros sans doublons---
For i = 2 To UBound(tablo)
d(tablo(i, 1)) = ""
Next
'---liste des manquants---
ReDim resu(1 To UBound(tablo), 1 To 1)
For i = prem To der
If Not d.exists(i) Then n = n + 1: resu(n, 1) = i
Next
'---restitution---
Application.EnableEvents = False 'désactive les évènements
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [E6] '1ère cellule de destination, à adapter
If n Then .Resize(n) = resu
.Offset(n).Resize(Rows.Count - n - .Row + 1).ClearContents 'RAZ en dessous
End With
Application.EnableEvents = True 'réactive les évènements
End Sub