View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jerry W. Lewis Jerry W. Lewis is offline
external usenet poster
 
Posts: 837
Default linest use in vba

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

"Larry" wrote:

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