Chart & Visualization Issues

How to Chart Conditionally Formatted Cell Colors in Excel

Tauseeq MagsiTauseeq Magsi Nov 11, 2026 868 views

Question details

The user wants to create a chart based on the total count of cells that are colored red or green by conditional formatting.

How to Chart the Number of Red and Green Conditionally Formatted Cells
Product
Spreadsheet
Device & OS
not provided
Scenario
Creating a bar or pie chart from data that relies on conditional formatting rules, where native charting tools cannot directly read the visual cell color.
Observed behavior
Spreadsheet charts cannot directly count or visualize cell colors applied via conditional formatting, requiring a logical workaround to summarize the data first.
Before you start

Identify the exact logical conditions (such as values > 100 or specific text matches) that trigger your current red and green conditional formatting, as you will need to replicate this logic in a formula.

Solution 1Recommended

Use a Helper Column and COUNTIF Function

Create a dedicated status column to evaluate the underlying condition, then count these statuses to build your chart.

Because charts only read values and ignore formatting, the most reliable method is to translate the formatting rule into a text value using a helper column.

1
Add a status column

Insert a new column next to your data. Use an IF formula (e.g., =IF(A2>100,"Green","Red")) to output the status for each row.

2
Apply conditional formatting (Optional)

To keep things organized, you can base your cell coloring on this new status column containing the words 'Red' or 'Green'.

3
Summarize the data

In a blank area of your spreadsheet, use the COUNTIF function to tally the statuses. For example, enter =COUNTIF(StatusRange,"Red") in one cell and =COUNTIF(StatusRange,"Green") in another.

4
Create the chart

Select your newly created summary counts and category labels, then go to the Insert tab and click Chart to generate a bar or pie chart.

Use a Helper Column and COUNTIF Function
Dynamic Updates: By using COUNTIF formulas, your summary table and the connected chart will automatically update whenever the source data changes.
WPS Spreadsheet Solution

Easily Chart Conditionally Formatted Data in WPS Spreadsheet

WPS Office provides powerful formulas and intuitive charting tools to quickly summarize and visualize conditionally formatted data without hassle.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your conditionally formatted data.
  2. 2. Insert an IF formula: Create a helper column and write an IF statement to assign text values like 'Red' or 'Green' based on your data criteria.
  3. 3. Count the results: Set up a small summary table and use the COUNTIF function to count the occurrences of each text value.
  4. 4. Insert the chart: Highlight the summary table, navigate to the Insert tab on the top ribbon, and click Chart to generate your visual representation.
Full compatibility with Microsoft Excel formulas like COUNTIF and IF.Seamlessly create PivotTables and professional charts with a few clicks.Free and lightweight alternative for all your spreadsheet tasks.Supports robust conditional formatting rules fully compatible with Excel formats.
microsoft office alternative - wps office

Frequently Asked Questions

Can I count cells directly by their background color without a helper column?

Standard spreadsheet formulas cannot directly count cells by background color, especially if the color is applied via conditional formatting. You must use a helper column to evaluate the condition or rely on advanced VBA macros.

How do I use a PivotTable instead of COUNTIF to chart the data?

After creating your helper status column, select your data range and go to Insert > PivotTable. Drag the status field into both the 'Rows' and 'Values' areas to get a count, then insert a PivotChart based on this table.

Why does my chart not update when the conditional formatting changes?

If your chart is linked to the summary table (using COUNTIF or a PivotTable), ensure your helper column correctly mirrors the conditional formatting rules. Note that PivotTables require a manual refresh (Right-click > Refresh) when underlying source data changes.