Count background color¶
Function CountBackgroundColor(champ As Range, backgroundColor)
Application.Volatile
Dim c, temp
temp = 0
For Each c In champ
If c.Interior.ColorIndex = backgroundColor Then
temp = temp + 1
End If
Next c
CountBackgroundColor = temp
End Function