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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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