hello,
I have a chart with four series and i want to add a fifth. the x values for the new series should be the same as for the others.
If i do not enter the range for the XValues for the new series, the line numbers are used.
i dont know what the cells will be used for the XValues for the first four series, so i just need to be able to say that they are the same
i was thinking something along the lines of this but i cant seem to get the commands just right
newX = ActiveChart.SeriesCollection(1).XValues
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(5).XValues = newX
or
ActiveChart.SeriesCollection(5).XValues = ActiveChart.SeriesCollection(1).XValues
but both of these give errors.
any help would be very welcome
I have a chart with four series and i want to add a fifth. the x values for the new series should be the same as for the others.
If i do not enter the range for the XValues for the new series, the line numbers are used.
i dont know what the cells will be used for the XValues for the first four series, so i just need to be able to say that they are the same
i was thinking something along the lines of this but i cant seem to get the commands just right
newX = ActiveChart.SeriesCollection(1).XValues
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(5).XValues = newX
or
ActiveChart.SeriesCollection(5).XValues = ActiveChart.SeriesCollection(1).XValues
but both of these give errors.
any help would be very welcome