0

I'm trying to loop a LinEst function in vba but it gives me error "Type mismatch"

For i = 2 to x
.Range("A" & i) = Application.WorksheetFunction.SeriesSum(xVal_start, 3, -1, Application.WorksheetFunction.LinEst(y_range, Application.WorksheetFunction.Power(x_range, Array(1, 2, 3)), True, False))
next i

any idea on what I'm missing?

braX
  • 11,506
  • 5
  • 20
  • 33
  • 1
    Hi welcome to SO. See if [this link](https://stackoverflow.com/questions/62226403/linest-for-polynomial-function-vba) helps – Naresh Jul 01 '21 at 08:26
  • Hi! Thanks for the link, though i already saw this post and tried to follow i didn't notice that i just need to exclude literally the "Application" on "Application.WorksheetFunction.LinEst" as well as for "WorksheetFunction" on "Application.WorksheetFunction.Power" in order for the code to work. Now it works fine. – Jc Quilates Jul 01 '21 at 09:17

0 Answers0