Function CountCouleur2(range_data As Range, criteria As Range, xNbr As Integer) As Long
Dim datax As Range
Dim xcolor As Long
xcolor = criteria.Interior.ColorIndex
For Each datax In range_data
If datax.Interior.ColorIndex = xcolor Then
If datax.Value = xNbr Then
xcpt = xcpt + 1
End If
End If
Next datax
CountCouleur2 = xcpt
End Function