Linear trendline equation....

Schmee

New Member
Joined
Sep 11, 2006
Messages
11
Maybe I'm being a bit slow, but can anyone give me the mathematics which Excel uses to generate the equation on the linear trendline? I have a set of data, of which I have generated a bar chart, with a linear trendline. The critical value for me is the slope, or "m" in the equation, y=mx+C. When I display the equation on the chart, I would like to automatically display the m (slope) in a cell, so that I can compare various slope or gradients. The formula Slope does not give the same value as the linear equation does. Also, as I add data, the trendline changes, and also the gradient. So I can't just copy the m-value into a cell. It needs to be automatically updated. Any suggestions???

Cheers,

Andymann
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The MrExcel book has a good article on this..

The Linest function uses y = mx + c, it returns two numbers when entered as an array formula. The first of these is the slope and the second is the Y-intercept (C)

Assuming your your historical data is in A1:a20, Select two cells side by side say b1:c1 and in the formula bar type =linest(a2:a20) and enter formula with Ctrl-Shift and Enter.

cell B1 will be the slope
 
Upvote 0
Many Thanks!

Once again, my problem has been solved!
How do I go about ordering a MrExcel Book???

Thanks and Cheers!

Andymann
 
Upvote 0

Forum statistics

Threads
1,218,499
Messages
6,142,828
Members
450,449
Latest member
Dave Carr QM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top