LikeLike

]]>is it possible to get the calculation procedure?

Marco

LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>http://www.excelforum.com/excel-charting-and-pivots/537215-linear-trendline-wrong-equation.html

The conclusion is the same: if you are plotting XY data, then use an XY chart (otherwise known as a Scatter chart, even though you can connect the points with a line).

Note that a line chart will only display XY data correctly if the X range is equally spaced increasing points, and it will only display correct trend line data if the X range is a consecutive series of integers, starting at 1.

LikeLike

]]>The chart in your spreadsheet is a “line” chart, which doesn’t have x range values. The specified x range is treated as labels, even if they are numbers.

If you create a trend line, it treats the x values as being 1,2,3,…

You need to change the chart type to “scatter (XY)”, then the chart trend line will return the same results as Linest.

Also for the TrendY macro to work you should switch off the display of the R2 value (or modify the code so it ignores the R2).

I’m surprised that line charts will display a trend line. It seems like asking for trouble to me.

LikeLike

]]>I’ll have a look through the code and see if I can find anything that might be throwing out the results.

LikeLike

]]>