Multivariable LINEST with X's in different non-adjacent columns

  • Thread starter Thread starter zutalors212
  • Start date Start date
Z

zutalors212

Suppose that I have Y in column A; X1 in column B, and X2 in Column D.
How do I perform the linear regression without cutting/pasting X2 to be
next to X1?

I am keenly familiar with LINEST.
 
The x columns must be contiguous in the call to LINEST. If they are not
contiguous in the worksheet, and you do not want to make them so, then you
will have to construct an array formula that will do it for you. You might
try something like

=LINEST(A1:A6, IF(COLUMN(B1:C6)=2,B1:B6,D1:D6) )

Jerry
 
Jerry W. Lewis wrote...
....
will have to construct an array formula that will do it for you. You might
try something like

=LINEST(A1:A6, IF(COLUMN(B1:C6)=2,B1:B6,D1:D6) )
....

More flexible to use {1,0}*B1:B6+{0,1}*D1:D6.
 

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

Back
Top