I want to count the yellow, red and white (no color) cells in a column (range) within a Microsoft Excell sheet. The colors are equal (i.e. only one RGB value of yellow is used, not light/dark yellow etc).
Is this possible?
I want to count the yellow, red and white (no color) cells in a column (range) within a Microsoft Excell sheet. The colors are equal (i.e. only one RGB value of yellow is used, not light/dark yellow etc).
Is this possible?
I doubt there is a way with normal Excel functions.
But here is a quick solution using VBA.
Range("A1:A100")
to whatever you needpress ALT+F8 and execute the macro
Sub countcolor()
For Each cell In Range("A1:A100")
Select Case cell.Interior.ColorIndex
Case 6: yellow = yellow + 1
Case 3: red = red + 1
Case 2: white = white + 1
Case Else: others = others + 1
End Select
Next
MsgBox "Yellow: " & yellow & Chr(13) _
& "Red: " & red & Chr(13) _
& "White: " & white & Chr(13) _
& "Others: " & others
End Sub