CF or VBA to format colour based on axis label

halesowenmum

Active Member
Joined
Oct 20, 2010
Messages
383
Office Version
  1. 365
Platform
  1. Windows
Question from a complete Excel dunce so - you have been warned! :)

I need to do a doughnut chart for Jan through Dec and have formatted (manually) the attached (I hope the image comes through ok).

https://drive.google.com/open?id=1DYmXE7TO9sXRu6Ox68ODLeWuRa80rpW9

The doughnut in Col F (which is the data for Jan) is for the data in row 7 and I want it such that the colour for Late (regardless of the value) is always shown Red, that the colour for Not started (regardless of the value) is always Grey, that the colour for In progress (regardless of the value) is always shown Green. I've shown in cols G and H the results after following certain steps and the effect it has on the doughnuts formatting (all of which manually applied). Copy/paste for the chart works fine but when I re-direct the chart to the appropriate row of data (eg for Feb to row 8 instead of 7) all the formatting disappears and I'm back to square one.

So I'm looking for a solution which, when I copy and paste for all the charts I need, it will CF based on the labels Late, In Progress etc and even when I say ok look at row 9 for your values, that formatting remains.

I know this must be possible and have an vague idea CF and/or VBA would do it, I just don't know how to do it.

I'd be so grateful for help with this.

Many thanks indeed.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Ignore the bit about the slice changing shape - not quite sure what I did there, but it isn't actually an issue.
 
Upvote 0

Forum statistics

Threads
1,223,704
Messages
6,173,984
Members
452,540
Latest member
haasro02

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