Here is a vb UDF solution for you
1. Copy code below
2. Press Alt and F11 on your keyboard to open VB Editor
3. Click on Insert and select Module
4. Paste code into Module and close VB Editor.
Use formula
example:
=GetColor(A2) and drag formula down. Formula will return numeric value for each color which you can count with COUNTIF function.
![]()
Function GetColor(Mycell As Range) GetColor = Mycell.Interior.ColorIndex End Function
Bookmarks