Automating Polynomial Order Selection in Linest

N

Nick Flyger

This is a follow up question to an earlier post about Linest. Want to
automate the order selection of the polynomial so an end user can quickly
change a cell reference to view the results of different orders (2-6).

The formula I am working with is...

=LINEST(Y's, X's^{1,2,3,4}), 1, 0) --> for a 4th order polyn

I want to be able to enter a value in a seperate cell which updates the
X's^{order} argument to reflect the new order e.g. if the new order is 2 then
that part of the formula updates to X's^{1,2} and so on.

Have poked around google and MS help to no avail.

Thanks in advance
Nick Flyger
 
S

sebcopla

Try this, were A1 contains the order polynomial you want.

LINEST(Y's, X's^ROW(INDIRECT("1:"&A1)), 1, 0)



cheers...
 
S

sebcopla

Try it out and for this solution to work it need to be:

LINEST(Y's, X's^TRANSPOSE(ROW(INDIRECT("1:"&A1))), 1, 0)
 

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