Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart Help!! Is this Possible!!

Status
Not open for further replies.

mbarnett

MIS
Jun 15, 2003
123
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top