martolz.blogg.se

Excel trendline equation to cell
Excel trendline equation to cell








excel trendline equation to cell

MsgBox ("An Error occured in the extract formula calulation." & vbCr & " " & vbCr & "Possible cause = Incorrect data values input." & vbCr & " " & vbCr & "Please check entries and try again."), vbCritical, "Equation Finder - Auto Help"Īpplication.Sheets("Equation Finder"). StrLabelC = (strLabelB, "e", "^")ĪctiveChart.SeriesCollection(1).Trendlines(1).DataLabel.SelectĪpplication.Sheets("Equation Finder").Protect "" StrLabelC = (strLabelB, "y ", "")Īpplication.Range("Y_Axis_Calced").Formula = strLabelCĮlseIf (1).Trendlines(1).Type = xlExponential Then StrLabelD = (strLabelC, "y ", "")Īpplication.Range("Y_Axis_Calced").Formula = strLabelDĮlseIf (1).Trendlines(1).Type = xlPower Then Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _ĮlseIf (1).Trendlines(1).Type = xlPolynomial ThenĮlseIf (1).Trendlines(1).Type = xlLogarithmic Then

excel trendline equation to cell excel trendline equation to cell

StrLabelH = (strLabelG, "y ", "")Īpplication.Range("Y_Axis_Calced").Formula = strLabelH I want to figure out have excel take an equation for a trendline out of a chart and paste it into a set of cells to calculate new values. StrLabelA = (1).Trendlines(1).DataLabel.Text If (1).Trendlines(1).Type = xlLinear Then You enter your new "X" in cell ("Equation Finder").Unprotect ""ĪctiveSheet.ChartObjects("Chart 4").Activate The "new_x" values are in cells A24:C24, where B24 and C24 are the formulas as shown. The "known_y" values are in green in E3:E22 The "known_x" values are in green in A3:C22 If you change the values in E3:E22, the trend() function will update Cell E24 for your new input at Cell A24.Įdit = The trend() formula is in Cell E24 where the cell references are shown in red.Ĭell A24 contains the new X, and is the cell to change to update the formula in E24Ĭell B24 contains the X^2 formula (A24*A24) for the new XĬell C24 contains the X^3 formula (A24*A24*A24) for the new X Column C is X^3 (two cells to the left cubed). Column B is X^2 (the cell to the left squared). Try trend(known_y's, known_x's, new_x's, const).Ĭolumn A below is X.










Excel trendline equation to cell