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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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/
_______
 
Back
Top