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/
_______