dean_mcwhorter
New Member
- Joined
- Dec 12, 2009
- Messages
- 11
Is there away to count cells with 1 or more different fill colors in a column?
Thanks, Dean
Thanks, Dean
Function CountOfColor(aRange As Range, ColorIndex As Double) As Double
Dim i As Long
Application.Volatile
If ColorIndex < 1 Then ColorIndex = xlNone
With aRange
For i = 1 To .Cells.Count
CountOfColor = CountOfColor - (.Item(i).Interior.ColorIndex = ColorIndex)
Next i
End With
End Function