Sub CompterLesCouleurs()
Dim Nb As Integer
    Nb = CompterCouleur(Range("B2:B20"), Range("A1"), True, True)
    MsgBox Nb
End Sub
Function CompterCouleur(pPlage As Range, pRangeCouleur As Range, CelluleComplète As Boolean, IgnorerCellulesVide As Boolean)
Dim Cellule As Range
Dim TrouveCaractere As Boolean
Dim i As Integer
    For Each Cellule In pPlage
        If CelluleComplète Then
            If Cellule.Font.Color = pRangeCouleur.Font.Color Then
                If Not (IgnorerCellulesVide) Or Cellule.Value <> "" Then
                    CompterCouleur = CompterCouleur + 1
                End If
            End If
        Else
            TrouveCaractere = False
            For i = 1 To Len(Cellule.Value)
                If Cellule.Characters(i, 1).Font.Color = pRangeCouleur.Font.Color Then
                    TrouveCaractere = True
                    Exit For
                End If
            Next i
            If TrouveCaractere Then CompterCouleur = CompterCouleur + 1
        End If
    Next Cellule
End Function