straight line connecting first and last point on a chart

  • Thread starter Thread starter hermac
  • Start date Start date
H

hermac

Hello,

I'm familiar with VBA, charts and trendlines but I'm looking for a way
to add a straight line to a xlXYScatter chart, connecting the first and
last points of a series. Just to visually compare it to a linear
trendline.
I'd be very grateful for any suggestion.
Thanks,
Herman
 
why not add a new series with the first and last points as the only members.
 
Thanks Tom,

You helped me a lot. That's indeed all it took :

.SeriesCollection.NewSeries
.SeriesCollection(2).XValues = "={0,365}"
.SeriesCollection(2).Values = "={0," & S & "}"
where S is the last point's value.

Sometimes it is so simple that it is overlooked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top