Selecting a region of an Excel plot to calculate the line functio.

D

Dude

Is there a way to calculate a line function for a segment of a curve directly
from the graph? I'd like to check changes in slope in different regions of
the plot without have to regroup my data set.
 
J

Jon Peltier

Dude -

You would have to work out a way to select the points for the analysis,
then carry it out. You could trap the click event to identify when you
clicked on the endpoints of a region. I have some examples showing how
to identify which point was clicked on here:

http://peltiertech.com/Excel/Charts/chartvba.html#PointInfo

It's a little more complicated to set up, but it's worth it to use the
embedded chart version (which can also work for chart sheets), so it's
easy to dump parameters about the fit in the sheet.

Knowing the endpoints, you would then either generate a new series and
carry out the trendline analysis, or extract that portion of the X and Y
values arrays, and use worksheetfunction.slope(Yarray,Xarray).

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

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

Top