Sum and count cells by color in Google Sheets
Cellhue adds formulas that add up, count and average cells by their fill color or font color. Recolor a cell and the totals update.
Free plan available. Works only inside the spreadsheet you open it in. Privacy policy
What Cellhue does
Sum, count, average
Five formulas: SUMBYCOLOR, COUNTBYCOLOR, AVERAGEBYCOLOR for fill color, SUMBYFONTCOLOR and COUNTBYFONTCOLOR for font color.
Pick a color your way
Point to a sample cell, like C1, or write a color code, like "#ff0000". Upper or lower case, short "#f00" works too.
Sidebar
Select a range, click Analyze selection and see every color with its cell count, sum and average. One click inserts a ready formula.
Why Cellhue
Recalculates when a color changes
Google Sheets does not recalculate a formula when only a color changes, so color formulas can keep showing old numbers. Cellhue refreshes its formulas when you open the file and when you click Refresh all. With Pro, it also refreshes on its own while the sidebar is open.
Plain formulas with normal ranges
Write =SUMBYCOLOR(A2:A50, "#ff0000") with a normal range, the way you write SUM. No ranges in quotes, no helper columns, no scripts to copy into your file.
Guides
How to count colored cells in Google Sheets
Three ways: filter by color with SUBTOTAL, an Apps Script function, or COUNTBYCOLOR.
How to sum cells by color in Google Sheets
Add up and average numbers by fill color, and keep the totals right when colors change.
Sum and count by font color
Work with red, green or any text color: SUMBYFONTCOLOR and COUNTBYFONTCOLOR.
Free and Pro
Free
$0
- Fill color:
SUMBYCOLOR,COUNTBYCOLOR,AVERAGEBYCOLOR - Ranges up to 1,000 cells
- Sidebar analysis and formula insert
- Refresh on file open and with Refresh all
Pro Pro
$19 one-time payment
- Everything in Free
- Font color:
SUMBYFONTCOLOR,COUNTBYFONTCOLOR - No range size limit
- Auto-refresh while the sidebar is open
Payments are handled by Polar. Get Pro
Questions
Can Google Sheets count or sum cells by color without an add-on?
There is no built-in COUNTBYCOLOR or SUMBYCOLOR function. You can filter a column by color and use SUBTOTAL, or write an Apps Script custom function. Both work, but the filter shows one color at a time and the script does not recalculate when a color changes. Cellhue adds ready formulas that do. See all three ways, step by step.
Do the totals update when I change a cell's color?
Google Sheets does not recalculate formulas when only a color changes. Cellhue refreshes its formulas when you open the file and when you click Refresh all. With Pro, it also refreshes on its own while the sidebar is open.
Can I count cells by font color (text color)?
Yes. SUMBYFONTCOLOR and COUNTBYFONTCOLOR work with the text color. They are part of Cellhue Pro. Font color guide.
Are colors from conditional formatting counted?
No. Cellhue reads the fill and font colors set on the cell. Colors shown by conditional formatting rules are not counted. For those cells, use COUNTIF or SUMIF with the same condition as the rule.
What access does Cellhue need?
Only the spreadsheet you open it in. It cannot see your other files, has no server of its own and does not send your spreadsheet data anywhere.
Is Cellhue Pro a subscription?
No. Pro is a one-time payment of $19. One license key works on up to 3 Google accounts.
Your data stays in Google Sheets
Cellhue has no server of its own. It reads only the spreadsheet you use it in, and your spreadsheet data is not sent anywhere. The only outside request is the Pro license key check with Polar. Read the Privacy Policy and Terms of Service.