Running LinEst() from VBA

M

Mitch

I am trying to run the linest() function from a VBA procedure, but keep
getting the
"Unable to set the FormulaArray property of the Range class" error message.
I am using the following VBA code within the procedure.
' select range for primary cubic values
ActiveSheet.Range("E25:H29").Select

' run linest() function
Selection.FormulaArray = _
"=LINEST(.Range(Y_rngStr)& "", "" & .Range(X_rngStr)& ""^{1,2,3},,TRUE)"""
Any suggestions?
 

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