Function ColCount(rngQuell As Range, intColorIndex As Byte) As Long
'by Nike 26.09.02
'Beispielfunktion mit Angabe des Zellbereichs
'Eingabe in das Blatt z.B. =BspFunc(A1:B1,3) auf Rot prüfen
Dim rng As Range
On Error GoTo Ende
ColCount = 0
For Each rng In rngQuell
If rng.Interior.ColorIndex = intColorIndex Then
ColCount = ColCount + 1
End If
Next
Set rngQuell = Nothing
Set rng = Nothing
Exit Function
Ende:
ColCount = 0
Set rngQuell = Nothing
Set rng = Nothing
End Function