Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

curve fit coefficients

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Curve Fit Coefficients

Curve Fit Coefficients

ResolvedVersion 2010

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

RE: Curve Fit Coefficients

Jens
LINEST has sorted my problem without needing VB/macro. The help site was very easy to understand and directly relevant.
Many Thanks
Roger

Excel tip:

Bracketed negative numbers

Often Excel users wish to display negative numbers in colour red and bracketed

Intstructions
Step1. Select Format > Cells menu options. Within Numbers tabsheet, select Category = Custom.
Step 2. Select a type such as #,##0;[Red]-#,##0;; that specifies a colour in square brackets.
Step 3. Amend as follows; #,##0;[Red](#,##0;;

Notes: Excel formatting featues are of the form
"Positive; Negative;Zero;Text" separated by semicolon.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.