Function Compte_Unique(P1 As Range, Optional P2 As Range)
Dim d As Object, c As Range
If P2 Is Nothing Then Set P2 = P1
Set d = CreateObject("Scripting.Dictionary")
For Each c In Union(P1, P2)
If CStr(c) <> "" Then If Not d.exists(CStr(c)) Then Compte_Unique = Compte_Unique + 1
Next
End Function