I've an excel template. This template I populate with data by running a program I've written. The excel template has a pivot table on a sheet that get's data from another sheet that I've updated. The pivot table has two columns and a connected chart.
The first column one is "Status" and the other is "Count of x". The first column contains a word like Implemented, Rejected, Issued, Accepted etc. All these words are known. The second column contains a number.
The rows in the pivot table varies. Sometimes there are only Implemented and rejected and sometimes more rows with values.
What I want
I want to be able to specify the legend key and connected pie chart color based on column one's text. So that Implemented is always green, rejected is always red etc.
If it's possible to write code that checks if the value is equal to one of the words and set the color based on those, that would be interesting.
There is a bug. If the excel get's macro enabled when the chart page is active excel remembers the color formatting. If another page is active when the user enables macro then the color formatting is forgotten by excel.