Y= SomeTypeOfEvaluationFunction (“2.6667*x + 11. Function TrendLineValue (x As Double) As Double Dim c As Chart Dim t As Trendline Dim s As String ' Get the trend line object ' this code assumes the first chart on the active sheet, ' and the first series, first trendline Set c ActiveSheet.ChartObjects (1).Chart Set t c.SeriesCollection (1).Trendlines (1) ' make sure equation is d. Y= SomeTypeOfEvaluationFunction (TrendlineEquation) Can I evaluate this directly using some type of string evaluation function, and if so how? Or do I have to use the laborious string functions to extract the coefficients and recreate the function using variables? That is, I have can obtain the equation of a trendline as a string. Is there a method of evaluating this equation directly in VBA rather than using string manipulation functions to extract the numerical values in order to create a new function? And you will get an intercept in Cell C20 (and a slope in Cell C19). Put this formula in Cell C19 and press ENTER. like the previous method, Excel’s X values are equivalent to our Y values here. This is an array formula which must be entered using the Control+Shift+Enter key combination. Using the Trendline Equation Feature of Excel Graph. Suppose I have a trendline equation y 0.3418 x + 1. However, can I evaluate this formula directly using some cool VBA function (see text from another posting)? Or do I need to use the laborious string functions? Suppose I have a trendline equation y 0.3418 x + 1.5364 Is it possible to use VBA to list all Y values corresonding to X Say I have 100 items in x-axis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |