How Do I COUNT Coloured Cells in Excel

This guide treats “count coloured cells in excel” the way busy spreadsheet users actually want it: answer first, then the reasoning. It is written for Excel but calls out every place Google Sheets differs, and the platform toggle at the top switches all shortcuts between Windows and Mac so nothing here assumes the keyboard you are not on.

Exact answer

In Excel: there is no COUNTCOLOR function — filter by colour and use =SUBTOTAL(103, range), which counts only the visible rows.

Annotated stepsExcel
1

Select the range and turn on Data ▸ Filter.

2

Put =SUBTOTAL(103, range) in a cell above or below the data — 103 is COUNTA over visible rows only.

3

Click the filter arrow ▸ Filter by Colour and pick the fill you want counted.

4

Read the SUBTOTAL cell; switch colours in the filter to count a different one.

5

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.

6

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.

=SUBTOTAL(103,B2:B200)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

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. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “count coloured cells in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. 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 is what makes a layout choice that keeps the sheet readable and sortable useful in real work: repeatable, auditable, and not dependent on memory or luck.

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. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

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. Treat “count coloured cells in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.

Common mistakes

  • Looking for a COUNTCOLOR or COUNTIFBYCOLOR function — none exists in any Excel version.
  • Using SUBTOTAL with 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.