
But they have nothing to do with the results I got from the Excel Diagram and the automatically calculated line. Matrix Formula in AA4:AE4 with =RGP(V3:V12 W3:Y12 1 1) Now I assumed that I can Use RGP() (German Excel version of the LINEST() function in English) but I get totally different results compared to the result of a trendline i put into the diagram (excel can show the formulas of trendlines in diagrams). The COUNT function COUNT (B2:B100) counts how many values are already entered in column B.

The function will instantly calculate the trendline slope when you enter the X and Y values. Assuming that the values to average are in column B beginning in row 2, the formula would be as follows: AVERAGE (OFFSET (B2,COUNT (B2:B100)-3,0,3,1)) And now, let's try to understand what this Excel moving average formula is actually doing. To stay flexible I want a solution which is capable of handling different degrees with "n" possibilites such as y = x0 + z1*x1^2 + z2*x2^2 +. The simplest way to determine the slope of the trendline is to use the SLOPE function if you have the data for the independent and dependent variables.


I have values for X and Y Axis and want to get the equation of the trendline. What I have is a graph which can be approximated by a polynominal formula. In the Format Trendline pane, under Trendline Options, select Moving Average.
