linest use in vba


L

Larry

I would like to obtain the coefficient of a curve fitted cubic polynomial.
y=f(x)
In excel I have used LINEST to obtain the coefficients.
I have attempted to use LINEST from VBA without successs.
The problem arises in the formating of the array equation {1,2,3} for the
powers of x.

Larry
 
Ad

Advertisements

J

Jerry W. Lewis

VBA has no concept of array formulas in the sense of Excel array formulas.
If your data is in a worksheet, you can use the VBA function
EVALUATE(expressionstring) to evaluate an Excel aray expression in VBA,
othewise you will have to to manually populate each element of a VBA array
before passing that array to LINEST.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top