Hi, I´m having trouble with my code because when the second serie is ploted it has the value of the sume of both series 1 and 2.
This is my code:
Dim Chart2 As ChartObject
Set Chart2 = ActiveSheet.ChartObjects.Add(Left:=10, Width:=1380, Top:=450, Height:=380)
Chart2.Chart.ChartType = xlLineStacked
Chart2.Chart.SeriesCollection.NewSeries
Chart2.Chart.SeriesCollection(1).Name = "Hours"
Chart2.Chart.SeriesCollection(1).XValues = ActiveSheet.Range("B93:S93")
Chart2.Chart.SeriesCollection(1).Values = ActiveSheet.Range("B95:W95)
Chart2.Chart.SeriesCollection.NewSeries
Chart2.Chart.SeriesCollection(2).Name = "CdT"
Chart2.Chart.SeriesCollection(2).XValues = ActiveSheet.Range("B93:S93")
Chart2.Chart.SeriesCollection(2).Values = ActiveSheet.Range("B99:W99)
Thank you in advance¡
This is my code:
Dim Chart2 As ChartObject
Set Chart2 = ActiveSheet.ChartObjects.Add(Left:=10, Width:=1380, Top:=450, Height:=380)
Chart2.Chart.ChartType = xlLineStacked
Chart2.Chart.SeriesCollection.NewSeries
Chart2.Chart.SeriesCollection(1).Name = "Hours"
Chart2.Chart.SeriesCollection(1).XValues = ActiveSheet.Range("B93:S93")
Chart2.Chart.SeriesCollection(1).Values = ActiveSheet.Range("B95:W95)
Chart2.Chart.SeriesCollection.NewSeries
Chart2.Chart.SeriesCollection(2).Name = "CdT"
Chart2.Chart.SeriesCollection(2).XValues = ActiveSheet.Range("B93:S93")
Chart2.Chart.SeriesCollection(2).Values = ActiveSheet.Range("B99:W99)
Thank you in advance¡