Hi
I am manually adding a specific color to a cell (Yellow) as a result i would like to count the number of cells that have a color.. i came across this code
I am manually adding a specific color to a cell (Yellow) as a result i would like to count the number of cells that have a color.. i came across this code
Code:
Function CountColor(Rng As Range, RngColor As Range) As Integer
Dim Cll As Range
Dim Clr As Long
Clr = RngColor.Range("N1").Interior.Color
For Each Cll In Rng
If Cll.Interior.Color = Clr Then
CountColor = CountColor + 1
End If
Next Cll
End Function