To add the r square value to the graph click the Display R-squared value on chart check box. Y 2x 5. You can also use these coefficients to do a forecast.
Click the Display Equation on chart check box to add the equation to the graph.
For this you use LINEST in combination with the SUM or SUMPRODUCT function. Make another table which contains the equations with variables and the constants. Using the linear equation labeled A in Figure 5 a spreadsheet cell can have an equation associated with it to do the calculation for us. Use the MINVERSE function to return the inverse matrix of A.