Gruppe
Allgemein
Problem
Wie kann ich die Anzahl aller mit einer vorgegebenen Zellinnenfarbe markierter Zellen eines vorgegebenen Bereiches zählen?
StandardModule: mHWH
Function ColorCount( _
rng As Range, _
iColor As Integer _
) As Integer
Dim rngAct As Range
Dim iCount As Integer
For Each rngAct In rng.Cells
If rngAct.Interior.ColorIndex = iColor Then
iCount = iCount + 1
End If
Next rngAct
ColorCount = iCount
End Function