Skip to main content

How to create a chart with conditional formatting in Excel?

Author: Kelly Last Modified: 2024-08-22

For example, you have a score table of a class, and you want to create a chart to color scores in different ranges, such as greater than 90, less than 60, and between 60 and 90 as below screenshot shown, how could you handle it? This article will introduce a way to create chart with conditional formatting to solve it.

a chart with conditional formatting


Create a chart with conditional formatting in Excel

To distinguish scores in different ranges in a chart, you can create the chart with conditional formatting in Excel.

1. Add three columns right to the source data as below screenshot shown:
(1) Name the first column as >90, type the formula =IF(B2>90,B2,0) in the first blank cell of this column, and then drag the AutoFill Handle to the whole column;
(2) Name the second column as <60, type the formula =IF(B2<60,B2,0), and drag the AutoFill Handle to the whole column;
(3) Name the third column as 60~90, type the formula =IF(AND(B2>=60,B2<=90),B2,0), and drag the AutoFill Handle to the whole column.
Add three helper columns with formulas

Now you will get a new source data as below screenshot shown:
drag and fill the formulas to other cells

2. Please select the Name column and the new three columns with holding the Ctrl key, and then click Insert > Insert Column or Bar Chart (or Column) > Clustered Column. See screenshot:
select the Name column and the new three columns, and click Clustered Column to insert a chart

Now a chart with conditional formatting is created. You will see the scores greater than 90 are blue, the scores less than 60 are orange, while the scores between 60 and 90 are gray. See screenshot:
a chart with conditional formatting is created


Create a chart with conditional formatting by an amazing tool

If you have Kutools for Excel installed, you can use its Color Grouping Chart feature to quickly create a chart with conditional formatting in Excel.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the data source you will create the chart based on, and click Kutools > Charts > Color Grouping Chart to enable this feature.

2. In the Color Grouping Chart, please do as follows:
 set options in the Color Grouping Chart
(1) Tick the Column Chart option;
(2) Specify the range of the axis labels;
(3) Specify the range of the series values;
(4) In the Group section, please click the Add button. Then in the Add a group dialog, please specify the group name, data range, and the certain range values as you need, and click the Add button.
Tips: This feature will add a conditional formatting rule by one group. If you need to add multiple conditional formatting rules for the chart, please add as many groups as you need.

3. Click the Ok button.

Now you will see a column chart is created, and columns are colored based on the specified groups.
 a column chart is created, and columns are colored based on the specified groups

Notes: When you change the values in the data source, the fill color of corresponding columns will be changed automatically based on the specified groups.


Conditional formatting an existing chart

Sometimes, you may have created a column chart as below screenshot shown, and you want to add conditional formatting for this chart now. Here, I will recommend the Color Chart by Value feature of Kutools for Excel to solve this problem.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

sample chart

1. Select the chart you want to add conditional formatting for, and click Kutools > Charts > Color Chart by Value to enable this feature.

2. In the Fill chart color based on dialog, please do as follows:
(1) Select a range criteria from the Data drop-down list;
(2) Specify the range values in the Min Value or Max Value boxes;
(3) Choose a fill color from the Fill Color drop-down list;
(4) Click the Fill button.
set options in the Fill chart color based on dialog

Tips:
(1) The (1)-(4) operations will change the fill color of columns whose data point values fall in the specified data range.
(2) If you want to change the fill color of other columns, you need to repeat (1)-(4) operations to create other rules, says change the fill color of columns whose data point values are between 60 and 90 to gray.
repeat operations to create other rules to change the fill color of the column

3. After finishing the operations, please click the Close button to quit the feature.

Notes: This method will solidly change the fill color of columns in the chart. If you change the values in the source data, the corresponding columns’ fill colors will not be changed.


Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

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!