Sincerely,
John T.
********************************************************************
** ** ** ** * ** DEPARTMENT OF CHEMISTRY **
** ** ** ** * ** tom...@protein.chem.washington.edu **
** ** ** ** * ** (206) 616-2993 **
** ***** ***** JOHN TOMASZEWSKI **
********************************************************************
If y = cEXP(bx)
Then LN(y) = LN(c) + bx ----> so we can use a linear plot with slope b and
intercept c
Hope this helps.
For now, place an embedded chart on your sheet and add a trendline to the
first series.
Leave cells A1 and A2 blank because this is where this routine places the
equations. (Adjust these as necessary.) Adjust the accuracy of the
returned number with NumberFormat.
Of course, you will have to adjust most of this to fit your needs.
Here is the macro. If you have any problems extracting the numbers to fit
your situation, than
please let me know.
This took me a long time to figure out when I was in graduate school, so
I'm pretty proud of this one.
Sub TrendLabel()
' Select your chart here.
ActiveSheet.ChartObjects(1).Activate
' Select your trendline here.
With ActiveChart.SeriesCollection(1).Trendlines(1)
' The DataLabel is 1 object,
' so work with only 1 equation at a time.
.DisplayEquation = True
.DisplayRSquared = False
' Give it your own format
.DataLabel.NumberFormat = "#,##0.0000000"
Worksheets("sheet1").Range("A1").Value = .DataLabel.Text
' Now work with the R Squared
.DisplayEquation = False
.DisplayRSquared = True
.DataLabel.NumberFormat = "#,##0.0000000"
Worksheets("sheet1").Range("A2").Value = .DataLabel.Text
End With
End Sub
John Tomaszewski wrote in message ...
>Hi all,
> I have a goal in mind that I can't seem to accomplish in Excel
>(Office95 or 97 versions) and would appreciate any assistance.
> I have a series of data points that I'm fitting with an
>exponential trendline. This works fine and I can chart them with out any
>problem and if I choose, plot the line equation (y=ce^-xb) on the chart.
>My problem is, for these series of 40-60 values I want to extract the