Clustered-Stacked Column Chart with Target Line

LenaMWork

New Member
Joined
Aug 4, 2015
Messages
13
Hi guys!

I was hoping someone could help me.
I need to create a
Clustered-Stacked Column Chart with Target Line
From a pivot table

now, it seems easy (I just recorded the macro, here it is):


ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnStacked
ActiveChart.SetSourceData Source:=Range("'Capacity Vs Work'!$A$3:$AJ$208")
ActiveChart.Location Where:=xlLocationAsNewSheet


ActiveChart.SeriesCollection(5).Select
ActiveChart.SeriesCollection(5).ChartType = xlLineMarkers


But as you can see I`m choosing the desired series from the report filter which I want to make as a line in my chart

The thing is, when I try to choose different series to display on my chart from the report filter, this definition for series5 goes back to default: stacked columns

Does anyone know how to make a specific series appear always as a line and all the other ones as staked columns even after choosing different series from the report filter to display on the chart?


ActiveChart.SeriesCollection(5).Select
ActiveChart.SeriesCollection(5).ChartType = xlLineMarkers


But as you can see I`m choosing the desired series from the report filter which I want to make as a line in my chart

The thing is, when I try to choose different series to display on my chart from the report filter, this definition for series5 goes back to default: stacked coloumn

Does anyone know how to make a specific series appear always as a line and all the other ones as staked columnes even after choosing different series from the report filter to display on the chart?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,221,417
Messages
6,159,789
Members
451,589
Latest member
Harold14

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