funktioniert die funktion zählenwenn, wenn alle zellen, die eine rote hintergrundfarbe haben, gezählt werden soll?
ich möchte in einer spalte alle zellen zählen, die die hintergrundfarbe "rot" haben. geht das irgendwie?
danke
Function CountColor(Rng As Range, iColor As Integer)
Dim rngAct As Range
Dim iCount As Integer
Application.Volatile
For Each rngAct In Rng.Cells
If rngAct.Interior.ColorIndex = iColor Then
iCount = iCount + 1
End If
Next rngAct
CountColor = iCount
End Function