Function Combien(Tableau As Range, colIdPerson%, colCat%, colNoDossier%, IdPerson$, Cat$)
Dim Tb, d As Object, i&
Tb = Tableau 'matrice, plus rapide
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Tb)
If Tb(i, colIdPerson) = IdPerson And Tb(i, colCat) = Cat Then d(Tb(i, colNoDossier)) = d(Tb(i, colNoDossier)) + 1
Next
Combien = d.Count
End Function