Function Numero_serie(champserie As Range, critereserie As Integer, _
champdate As Range, criteredate As Date) As Integer
Set MonDico = CreateObject("Scripting.Dictionary")
a = champserie
b = champdate
For i = LBound(a) To UBound(a)
If a(i, 1) = critereserie And Month(b(i, 1)) = Month(criteredate) _
And Year(b(i, 1)) = Year(criteredate) Then
MonDico(a(i, 1) & " " & b(i, 1)) = MonDico(a(i, 1) & " " & b(i, 1))
End If
Next i
Numero_serie = MonDico.Count
End Function