Salut Force rouge
Edouard7522, tes données sont importées et les nombres ressortent sous forme de texte (alignés à gauche dans tes cellules)
Je contourne le problème comme ceci :
Sub jours_manquants()
Dim debut As Long, fin As Long, i As Long, a, e
Application.ScreenUpdating = False
debut = Range("a1").Value
fin = Range("a" & Rows.Count).End(xlUp).Value
With CreateObject("Scripting.Dictionary")
For i = debut To fin
.Item(i) = Empty
Next
a = Range("a1", Range("a" & Rows.Count).End(xlUp)).Value
For Each e In a
If .exists(CLng(e)) Then .Remove CLng(e)
Next
If .Count > 0 Then
Range("a" & Rows.Count).End(xlUp)(2).Select
Range("a" & Rows.Count).End(xlUp)(2).Resize(.Count).Value = _
Application.Transpose(.keys)
End If
End With
With Range("a1").CurrentRegion
.Columns(1).TextToColumns FieldInfo:=Array(1, 1)
.Columns(1).NumberFormat = "00"
.Sort key1:=Range("a1"), order1:=1, Header:=1
End With
Application.ScreenUpdating = True
End Sub
Tes données commençant en A1 et B1 sans en-tête
Edit : si tu entres au clavier tes données (numériques) présentées plus haut, la première macro fonctionne.
klin89