Pie chart based on cell colors
nololo
Posted messages
2
Status
Member
-
Raymond PENTIER Posted messages 58213 Registration date Status Contributor Last intervention -
Raymond PENTIER Posted messages 58213 Registration date Status Contributor Last intervention -
Hello,
I would like to create a "Pie Chart" based on cell colors (each cell counts as 1), let me explain.
In my table, there are cells of different colors (green, red, blue). For example, there are 10 green cells, 28 red cells, and 3 blue cells. (there is also text in these cells)
I want my chart to only consider the colors. In this case, I would like my chart to represent 10% for the green section, 28% for the red section, and 3% for the blue section.
I hope I have been clear enough.
Thank you in advance.
I would like to create a "Pie Chart" based on cell colors (each cell counts as 1), let me explain.
In my table, there are cells of different colors (green, red, blue). For example, there are 10 green cells, 28 red cells, and 3 blue cells. (there is also text in these cells)
I want my chart to only consider the colors. In this case, I would like my chart to represent 10% for the green section, 28% for the red section, and 3% for the blue section.
I hope I have been clear enough.
Thank you in advance.
6 answers
-
nololo,
you can see that to draw your pie chart, you had to go through the table E4:E7!
That's exactly what I explained to you, you need numerical data.
You just have to find a way to determine this data (7, 2, 4, and 1 here).
The simplest method is to use conditional formatting to apply colors in column B, by putting a code in column D: 1 for green, 2 for yellow, 3 for blue.
All you need to do is enter 1, 2, 3, 4 in F4:F7
then the formula =COUNTIF($D$3:$D$999,F4) in E4, to be copied down to E7.
https://www.cjoint.com/?BKuprEpNZh3
No macros, simple to adapt, no bugs to worry about, unlimited colors with Excel 2007/2010!
Best regards.
--
Retirement is great! Especially in the Caribbean ... :-)
☻ Raymond ♂ -
A beginning ...
https://www.cjoint.com/?3KuowNHJYCK
The addition of data in column B is taken into account (after Ctrl+k)
good continuation -
Hello
To clarify things, could you send your workbook (in Excel 2003 format) without any confidential data to cjoint.com and include the link obtained in your next message?
Try to explain:
- what you want to achieve
- if the data will evolve
- etc...
Best regards -
Definition: In Excel, a chart is a drawing that represents numerical data.
Chart: To obtain the pie chart you want, you need a small auxiliary table, for example "Green" in L5, "Red" in M5, "Blue" in N5, 10 in L6, 28 in M6, and 3 in N6. Select L5:N6 and do Insert/Chart/Sectors.
Best regards.
Retirement is great! Especially in the Caribbean ... :-)
☻ Raymond ♂ -
Thank you for your answers,
Unfortunately, I fear that what I'm asking for is impossible.
The second solution (Raymond Pentier) is interesting but it won't save me time and is therefore not useful in my case.
I created an Excel document that you will find at this link: https://www.cjoint.com/?3Kui5UzlrAw
In my chart, I would like my pie chart to show 7 greens, 2 yellows, 4 blues, and 4 without color (as in the chart I created manually).
Unfortunately, the official document being much larger, it is not possible for me to do it this way.
Best regards, -
hello
not impossible, but we'll need to go through a macro
I'll take a look at that
see you later