I am writing a VBA function which will take X and Y curve points and determine their polynomial trendline coefficients. I don't want to create an Excel chart to obtain the coefficients.
Eventually I'd like to let the user select a set of X and Y points on a spreadsheet, pass them to the VBA function and return different values back to the spreadsheet.
J-Walk & Associates webpage provides equations for calculating the trendline coefficients. Unforturnately, I can't get the function to work.
Here is the primary code which is causing the problem.
When I run the code above I get the error "Type mismatch". I tried converting the xFlow and yTDH values to an array but with no success.
Thanks in advance.
Bookmarks