VBA to select specific segment of a stacked bar chart

velohead

Board Regular
Joined
Aug 22, 2007
Messages
212
Hi All,

I have a stacked bar chart with 15 items, eg apples, oranges, lemons, limes etc.
For each of those I have two bars, say actual and budget.
Each of those bars (30 of them 15x2=30) has 12 segments, for the 12 months of the year.

I just need a simple macro to select say segment 2 of bar 2 (being Apples/Actuals) and amend the colour.
I would then have to repeat for bar 4, bar 6, bar 8 up to bar 30. Manually repetitious, with VBA a breeze.
Once I have solved that I can augment the macro to select any segment of any bar to change the colour.

To be honest, I find selecting a particular segment manually as extremely hit and miss on this stacked bar charts.

Hope there is a VB solution, thanks all.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,812
Messages
6,181,105
Members
453,021
Latest member
Justyna P

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