Hi All
The below code creates stacked column chart. Is it possible to seperate the Series 3 and Series 4 in a seperate stacked column in the same chart. Is it possible -
Sub Macro2()
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined TypeName:= _
"Julia Chart"
ActiveChart.SetSourceData Source:=Sheets("Data").Range("K91")
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = "=Data!R64C5:R64C8"
ActiveChart.SeriesCollection(1).Values = "=Data!R66C5:R66C8"
ActiveChart.SeriesCollection(1).Name = "=Data!R66C1"
ActiveChart.SeriesCollection(2).Values = "=Data!R67C5:R67C8"
ActiveChart.SeriesCollection(3).Values = "=Data!R74C5:R74C8"
ActiveChart.SeriesCollection(3).Name = "=Data!R71C1"
ActiveChart.SeriesCollection(4).Values = "=Data!R75C5:R75C8"
ActiveChart.Location Where:=xlLocationAsObject Name:="Data"
With ActiveChart
.HasTitle = False
.Axes(xlCategory xlPrimary).HasTitle = False
.Axes(xlValue xlPrimary).HasTitle = False
.Axes(xlCategory xlSecondary).HasTitle = False
.Axes(xlValue xlSecondary).HasTitle = False
End With
End Sub
The below code creates stacked column chart. Is it possible to seperate the Series 3 and Series 4 in a seperate stacked column in the same chart. Is it possible -
Sub Macro2()
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined TypeName:= _
"Julia Chart"
ActiveChart.SetSourceData Source:=Sheets("Data").Range("K91")
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).XValues = "=Data!R64C5:R64C8"
ActiveChart.SeriesCollection(1).Values = "=Data!R66C5:R66C8"
ActiveChart.SeriesCollection(1).Name = "=Data!R66C1"
ActiveChart.SeriesCollection(2).Values = "=Data!R67C5:R67C8"
ActiveChart.SeriesCollection(3).Values = "=Data!R74C5:R74C8"
ActiveChart.SeriesCollection(3).Name = "=Data!R71C1"
ActiveChart.SeriesCollection(4).Values = "=Data!R75C5:R75C8"
ActiveChart.Location Where:=xlLocationAsObject Name:="Data"
With ActiveChart
.HasTitle = False
.Axes(xlCategory xlPrimary).HasTitle = False
.Axes(xlValue xlPrimary).HasTitle = False
.Axes(xlCategory xlSecondary).HasTitle = False
.Axes(xlValue xlSecondary).HasTitle = False
End With
End Sub