In Excel: there is no COUNTCOLOR function — filter by colour and use =SUBTOTAL(103, range), which counts only the visible rows.
Select the range and turn on Data ▸ Filter.
Put =SUBTOTAL(103, range) in a cell above or below the data — 103 is COUNTA over visible rows only.
Click the filter arrow ▸ Filter by Colour and pick the fill you want counted.
Read the SUBTOTAL cell; switch colours in the filter to count a different one.
For a one-off count instead, press Ctrl+F ▸ Options ▸ Format ▸ Choose Format From Cell, click a coloured cell, then Find All and read the count in the dialog.
Better long-term: add a Status column holding the meaning, apply the colour with conditional formatting driven by that column, and count with a plain COUNTIF.
What this does
Excel has no worksheet function that can see a cell's fill. COUNTIF, COUNTA and SUMIF all read values, so no formula built from them can count by colour. Three approaches actually work. Filter by Colour plus SUBTOTAL is the one to reach for: SUBTOTAL with function number 103 counts only visible rows, so filtering the column by fill colour makes the count update as you switch colours. Find & Select ▸ Find with Format ▸ Find All reports the match count in the dialog for a one-off answer. And a short VBA function can read Interior.ColorIndex if you genuinely need it in a cell — at the cost of a macro-enabled workbook. The real lesson is that colour is formatting, not data: if a colour means something, put that meaning in its own column and count that instead. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “count colored cells” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a layout choice that keeps the sheet readable and sortable into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
Status values in B2:B200, some filled amber. Put =SUBTOTAL(103, B2:B200) in B1. Turn on Data ▸ Filter, click the column's filter arrow ▸ Filter by Colour ▸ the amber swatch. B1 now reads 34 — the number of amber rows — and changes as you pick a different colour. Without the filter it reads 199, because SUBTOTAL only ignores rows the filter hid. For the one-off route: Ctrl+F ▸ Options ▸ Format ▸ Choose Format From Cell ▸ click an amber cell ▸ Find All, and the dialog footer reports "34 cell(s) found". Colour-coded trackers are everywhere and the first question anyone asks of one is "how many are red" — which is exactly the question Excel is worst at answering, and the reason to keep the meaning in a column. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. The short version of “count colored cells”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Looking for a COUNTCOLOR or COUNTIFBYCOLOR function — none exists in any Excel version.
- Using
SUBTOTALwith 3 instead of 103: the 1–11 codes still count hidden-by-filter rows in some cases, while 101–111 always exclude them. - Expecting the count to refresh when you recolour a cell — fills are not a calculation input, so nothing recalculates until the filter is reapplied.
- Counting colours applied by conditional formatting with the Find-by-format route; it matches only manually applied fills, not rule-driven ones.
- Building a process on colour rather than on a value column, which no formula, PivotTable or filter can reliably read.
Frequently asked questions
How do I count coloured cells in Excel?
Filter the column by colour, then use =SUBTOTAL(103, range), which counts only visible rows. There is no built-in function that reads cell fill directly.
Is there a COUNTCOLOR function?
No. Excel has no worksheet function that can see formatting. The alternatives are Filter by Colour with SUBTOTAL, Find All with a format filter, or a VBA user-defined function.
How do I count cells coloured by conditional formatting?
Count the underlying condition instead, with COUNTIF or COUNTIFS. Conditional formatting colours are not stored on the cell, so neither Find-by-format nor VBA's Interior.ColorIndex sees them.
Why does my count not update when I change a colour?
Changing a fill is not a calculation event, so Excel does not recalculate. Reapply the filter, or press Ctrl+Alt+F9 to force a full recalculation.
Other ways people ask this
On the way here you may have searched this as “count of colored cells in excel”, “count the colored cells in excel”, “how to count colored cells in excel” and “how can i count colored cells in excel” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “count of colored cells in excel”, “count the colored cells in excel”, “how to count colored cells in excel” all point at the one operation explained on this page, which is why they all lead here.