I am trying to simply count all cells in a column that have a background color. Any color it doesn´t matter which one. I have used a module using this code:
Function CountCcolor(range_data As Range) As Long
Dim datax As Range
For Each datax In range_data
If datax.Interior.ColorIndex <> xlNone Then
CountCcolor = CountCcolor + 1
End If
Next datax
End Function
This works good when I apply the formula for the first time. It no longer reacts, when I change fill in the sheet. How can I exceute this function, every time the users edit a cell?