Conditionally formatting doughnut chart based on non-percentage value

Pi_Lover

New Member
Joined
Nov 3, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
How do I conditionally format a doughnut chart based on a value that is not a percentage? Chart will remain at 100%, but I want the color to change based on a specific number value. Such as <=1 is green, >1 and <=1.5 is yellow, and >1.5 is red. Is this possible to do?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I think it would require a secondary table to return the % of the different ranges. So if you had an arrangement like this:
Book1
ABCD
1ValuesRangePercent
22<=125%
30.751-1.525%
41>1.550%
51.25
61.5
72
82
92
Sheet1
Cell Formulas
RangeFormula
D2D2=COUNTIF($A$2:$A$9,"<=1")/COUNTA($A$2:$A$9)
D3D3=COUNTIFS($A$2:$A$9,">1",$A$2:$A$9,"<=1.5")/COUNTA($A$2:$A$9)
D4D4=COUNTIF($A$2:$A$9,">1.5")/COUNTA($A$2:$A$9)


You could produce a donut chart like this:
1700438312639.png
 
Upvote 0
I think it would require a secondary table to return the % of the different ranges. So if you had an arrangement like this:
Book1
ABCD
1ValuesRangePercent
22<=125%
30.751-1.525%
41>1.550%
51.25
61.5
72
82
92
Sheet1
Cell Formulas
RangeFormula
D2D2=COUNTIF($A$2:$A$9,"<=1")/COUNTA($A$2:$A$9)
D3D3=COUNTIFS($A$2:$A$9,">1",$A$2:$A$9,"<=1.5")/COUNTA($A$2:$A$9)
D4D4=COUNTIF($A$2:$A$9,">1.5")/COUNTA($A$2:$A$9)


You could produce a donut chart like this:
View attachment 102173
I wan the chart to stay at 100% permanently, but change colors depending on a value other than a percentage. If that makes sense. Meaning the entire chart reads 100" green, or yellow, or red
 
Upvote 0
Understood. The closest I can come is by creating a table that returns either 1 or "" depending on the value of another cell. You can then overlap the three data series separately on the same chart (enabling you to format them individually) so you end up with something like this:
Data series:
Book1
ABCDE
1
2Value:1.6
3
4Range<11-1.5>1.5
5Value  1
Sheet1
Cell Formulas
RangeFormula
C5C5=IF(C2<=1,1,"")
D5D5=IF(AND(C2>1,C2<=1.5),1,"")
E5E5=IF(C2>1.5,1,"")


Chart results:
 

Attachments

  • Picture1.png
    Picture1.png
    26.8 KB · Views: 5
  • Picture2.png
    Picture2.png
    17.3 KB · Views: 6
  • Picture3.png
    Picture3.png
    24.3 KB · Views: 5
Upvote 1
Solution
Understood. The closest I can come is by creating a table that returns either 1 or "" depending on the value of another cell. You can then overlap the three data series separately on the same chart (enabling you to format them individually) so you end up with something like this:
Data series:
Book1
ABCDE
1
2Value:1.6
3
4Range<11-1.5>1.5
5Value  1
Sheet1
Cell Formulas
RangeFormula
C5C5=IF(C2<=1,1,"")
D5D5=IF(AND(C2>1,C2<=1.5),1,"")
E5E5=IF(C2>1.5,1,"")


Chart results:
This works perfectly. Until I change the chart to a segmented doughnut chart. Any idea on why each color remains at 100% despite the cell value, after doing so? I've tried a few things to no avail
 
Upvote 0
Because I thought that was what you wanted:

If you're looking for something else, I think you need to explain a bit more about your logic. A sample of both the table, and your expected outcome would be ideal.
What I am looking for is 1 segmented doughnut chart that will change colors depending on a cell value. The overlaying of each chart works, except for when I turn it into a segmented doughnut chart. Meaning, before I change it to a segmented chart, the doughnut chart (red chart) will drop to zero % when the value changes, thus showing the next color under it. But once I change the doughnut chart to a segmented doughnut chart the each color stays at 100% and will not drop to 0% with the value change. So I can set up a standard doughnut chart and overlay all 3 over one another and the correct color goes to 100% with the value change, but not when i change the chart to a segmented doughnut chart.
 
Upvote 0
I can go into more detail with the table and charts once I get home this evening. That may be more helpful
 
Upvote 0
By "segmented doughnut chart" do you mean like what I offered in post #2? Unfortunately, my reading of your requirements is a combination of the solution in post #4 & post #2 - and I don't know how to do that. As I said, an actual sample of what you mean would be much more useful than a description.
 
Upvote 0
Here is a segmented doughnut chat. Once I make the doughnut segmented, it stays 100% permanently. Even if the value changes
 

Attachments

  • Segemented Doughnut Chart.PNG
    Segemented Doughnut Chart.PNG
    22.1 KB · Views: 4
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,276
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top