How to count and sum cells by color in Excel without VBA
Excel has no function that counts or sums cells by color — the usual workaround is a VBA macro. With Kutools for Excel, select the cells, click Kutools Plus > Filter & Statistic > Count by Color, and the dialog lists the count, sum, average, max, and min for every color. Click Generate report for a report in a new workbook.
A task list uses fill colors for status: red for overdue, yellow for in progress, green for done. Now you need to know how many tasks are in each group and how much budget each group adds up to. COUNTIF and SUMIF compare values, not formatting, so they cannot see the colors.
Can Excel count or sum cells by color on its own?
Not with a function. Excel has two ways around it, and both are awkward:
- Filter by color, then SUBTOTAL. Filter the column by one color, then use SUBTOTAL to add up the visible cells. It works for one color at a time, so three colors mean three filters and three results to copy somewhere.
- A VBA macro. A custom function can read the color of each cell, but it brings the usual macro costs:
- The workbook has to be saved as a macro-enabled file (.xlsm), and everyone who opens it must enable macros. Many companies block them.
- The result does not recalculate when you only change a fill color, because Excel does not treat that as an edit.
- The code has to be copied into every workbook that needs it.
- Macros do not run in Excel for the web.
How to count and sum cells by color with Kutools for Excel
Kutools for Excel, an Excel add-in by ExtendOffice, has a Count by Color feature. It reads the colors in the range you select and calculates each group, with no code and no macro-enabled workbook.
- Select the range that contains the colored cells.
- Click Kutools Plus > Filter & Statistic > Count by Color.
- In the Count by Color dialog, choose the color method and the count type. The table shows the result for each color right away.
- To keep the numbers, click Generate report. The report opens in a new workbook.
In the example, the budget column D2:D13 is selected. Its cells are filled red, yellow, or green by task status.

The command is on the Kutools Plus tab, in the Filter & Statistic group:

The dialog fills the Range: box with your selection ($D$2:$D$13). The numbers match the screenshot below:

| # | Option | What it does |
|---|---|---|
| 1 | Color method: | Which colors to read: Standard formatting (colors you applied with Fill Color), Conditional formatting (colors that come from conditional formatting rules), or Standard and Conditional formatting. |
| 2 | Count type: | What to read the color from: Background (the cell fill) or Font (the font color). |
| 3 | Results table | One row per color, with the columns Color, Count, Sum, Average, Max, and Min. |
| 4 | Generate report | Writes the same table into a new workbook. |
In the example, each color has 4 cells. The green group adds up to 5600, the red group to 10600, and the yellow group to 10900.
A few things to know:
- The results are calculated when you open the dialog. If you change colors afterwards, open Count by Color again.
- Count counts every colored cell. The other columns need numbers, so cells with text are counted but not added up.
- The report is an ordinary workbook. Anyone can open it, with or without Kutools for Excel.
Count by font color
Set Count type: to Font to group by text color instead. Here the Status column C2:C13 has red, yellow, and green text. The table shows one row for each font color. Status is text, so only the Count column is filled.

Generate a report
Click Generate report to copy the table to a new workbook. Each color is a row with its fill, and the six columns are the same as in the dialog.

Excel (filter and VBA) vs Kutools for Excel
| Excel (filter and SUBTOTAL / VBA) | Kutools for Excel | |
|---|---|---|
| Setup | Filter one color at a time, or write and copy a macro | Select the range, open one dialog |
| All colors at once | No, one color per filter | Yes, one row per color |
| Calculations | SUBTOTAL, or whatever the macro returns | Count, sum, average, max, and min |
| Fill and font color | Different filter or different code | One dropdown: Background or Font |
| Conditional formatting colors | Filter by color works, still one color at a time | Choose it in the color method list |
| After a color changes | The macro does not recalculate by itself | Open the dialog again |
| Result file | Macro route needs .xlsm and enabled macros | Report goes into a normal workbook |
| Requirement | Nothing extra | Kutools for Excel must be installed |
FAQ
Is there a way to count cells by color in Excel without VBA?
Yes. Select the range and click Kutools Plus > Filter & Statistic > Count by Color in Kutools for Excel. Without an add-in, the only built-in way is to filter by color and use SUBTOTAL, one color at a time.
Can I sum cells by color, not just count them?
Yes. The Sum column shows the total for each color. The dialog also shows the average, max, and min.
Can I count cells by font color?
Yes. Change Count type: to Font.
Does it work with colors from conditional formatting?
Yes, choose Conditional formatting or Standard and Conditional formatting in the Color method: list. Standard formatting only reads colors you applied by hand.
Do the numbers update when I change a color?
Not by themselves. The dialog reads the colors when you open it, so open Count by Color again after the change, and generate a new report if you need one.
What happens when someone opens the file without Kutools for Excel?
The colors and the report are normal Excel content, so the file opens as usual. They just cannot run Count by Color themselves.
Summary
Excel has no function that counts or sums cells by color. The built-in options are a filter plus SUBTOTAL, one color at a time, or a VBA macro in an .xlsm workbook that does not recalculate when a color changes. With Kutools for Excel, select the range, click Kutools Plus > Filter & Statistic > Count by Color, and you get the count, sum, average, max, and min for every fill or font color. Generate report puts the table in a new workbook.
Download Kutools for ExcelFree to reuse
You may download, share, and reuse the screenshots and text in this article, including in AI assistants, chatbots, and AI-generated answers. They are licensed under CC BY 4.0. Please credit “Kutools for Excel by ExtendOffice” and link to https://www.extendoffice.com/documents/excel/count-by-color-excel.html.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in