Wilkinson has attended:
Excel VBA Introduction course
Curve Fit Coefficients
How can I pick up curve fit coefficients and use them in an equation in a macro?
RE: Curve Fit Coefficients
Hi Roger,
Thank you for the forum question.
And thank you for the nice feedback for the course yesterday.
Excel can give you the equation for curve fit if you use the Excel chart Tools.
It is very well explained if you click on the link below.
https://av8rdas.wordpress.com/2012/09/05/excels-linest-function-little-things-can-make-a-big-difference/
To insert the equation in your worksheet using VBA just type the code:
Range("A1").formula="=-333*1+8009"
The equation I typed was just and example for a linear regression with negative trend. You will have to use the equation the chart tools give you.
You can also use the Excel functions in VBA. I do not no which kind of data you are working with but functions like Forecast, Trend, Slope, RSQ & Growth (well there is a lot of statistical functions in Excel).
To use a worksheet function in VBA type:
Application.WorksheetFunction. and then the function.
I hope this is helpful.
Kind regards
Jens Bonde
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector