Forum Discussion
jjpbello
Apr 07, 2026Occasional Reader
help with formula
how do i count cells in an array that have a certain fill color?
Olufemi7
Apr 08, 2026Iron Contributor
Hellojjpbello,
Excel cannot count cells by fill color with a built-in formula. Use one of these approaches:
VBA function – create CountColor(rng, colorCell) to return how many cells match a color. See Microsoft documentation
Filter by color – Data → Filter → Filter by Cell Color → see count in status bar. See Microsoft documentation
Conditional formatting – count using COUNTIF or COUNTIFS based on the condition, not the color