You strike through the rows you’ve dealt with, or bold the ones
that matter, and now you want a running count — or a sum of their
values. Google Sheets has no COUNTIF for formatting:
whether a cell is bold or struck through
isn’t something the formula engine can read. You have three
options.
Method 1 — Tag the cells, then filter
Google Sheets can Filter by color, but there is no “filter by bold” or “filter by strikethrough”. The only no-code route is to convert the style into something a filter can see:
- Give every styled cell a distinct fill colour (select them — hold Ctrl to pick several — and apply one fill).
- Data → Create a filter, then the column’s filter icon → Filter by color → Fill Color.
- Select the visible cells and read Count / Sum in the status bar, bottom-right.
Method 2 — A custom function you paste yourself
Free and it stays in the sheet — but you also own the upkeep, and this snippet only counts. Open Extensions → Apps Script, paste this, and save:
Back in the sheet: =COUNTFONTSTYLE("B2:B100", "line-through").
- The range must be passed as a string (
"B2:B100") — a normal range argument gives Apps Script only the values, never the formatting. - Changing only a cell’s style does not recalculate the sheet, so the number goes stale until you edit a value, reopen the file, or add an
onEdittrigger that forces a refresh. - Summing instead of counting means a second near-identical function; averaging, min and max mean more still.
- The script lives in this spreadsheet only. Every other file you want it in, you paste it again and re-authorise; every collaborator does the same in their copy.
Method 3 — The Custom Count & Sum add-on
Install once and the functions are in every spreadsheet on your account — now and later — with no code to paste or keep working. You get every aggregation by style, plus a refresh so style changes actually register. After installing Custom Count & Sum:
Beyond the basic count, the add-on version adds:
- every aggregation, not just count —
SUMSTYLE,AVERAGESTYLE,MINSTYLE,MAXSTYLE,MEDIANSTYLE; ISFONTSTYLE, which returns a TRUE/FALSE array so you can weight or filter values in a different column;- several ranges at once —
=COUNTSTYLE({"B2:B100","E2:E100"}, "bold"); - style and colour in one test with
COUNTCOLORANDSTYLE.
The full list is on the function reference.
MAP, BYROW or other
LAMBDA functions — Google runs those entirely in the
calculation engine, which has no access to a cell’s formatting.
Which method should you use?
| Manual tagging | Own script | Add-on | |
|---|---|---|---|
| Setup | None | Paste & maintain code | One-click install |
| Lives in the sheet as a number | No | Yes | Yes |
| Updates after a style change | Re-tag by hand | Only with a custom trigger | Yes, via built-in refresh |
| Sum, average, min/max, cross-column | No | A function each | Built in |
| Available in your other spreadsheets | — | No — paste per file | Yes — every sheet on your account |
| Upkeep | Re-tag by hand | You own every fix & addition | Updates itself |
| Cost | Free | Free | Free up to 30 cells per formula, then a plan |
Manual tagging only makes sense for a one-time count on a small range. A custom function works if you need a single style counted and don’t mind the recalc caveat. Reach for the add-on when styling is part of how you track the sheet and you also need sums, averages or a style check against another column.
Count bold and strikethrough cells without a script
Custom Count & Sum adds 38 formatting-aware functions to Google Sheets. Free for formulas up to 30 cells.
Install free from Google Workspace Marketplace