Indexing LINEST formula coefficients non-redundantly

MahTah

New Member
Joined
Feb 26, 2016
Messages
12
Hello all,
What I find online about how to find LINEST formula coefficients in EXCEL cells (NOT VBA) is introducing INDEX function directly on LINEST function like below:

Equation: y = (c2 * x^2) + (c1 * x ^1) + b
c2: =INDEX(LINEST(y,x^{1,2}),1)
C1: =INDEX(LINEST(y,x^{1,2}),1,2)
b = =INDEX(LINEST(y,x^{1,2}),1,3)

Now, to find all the coefficients, I should actually find 3 times the LINEST coefficients and then on each time index only one coefficients which can be costly on calculation time specially if I have a big set of x and y ranges.
I tried to calculate the LINEST on one cell and then only to index the content of that cell which didn't work. Now the question, What is the clean way to index LINEST coefficients without calculating the whole array of coefficients redundantly?

Thank you in advance for your help,
Mahdi
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Let's say that you want to put the LINEST function in A1. What you should do is select A1:C1, and while all 3 cells are still selected, enter your formula in A1, then instead of pressing Enter when you're done, press Control+Shift+Enter. Your 3 coefficients will be in A1:C1.
 
Upvote 0
Alternatively, you can use =INDEX(LINEST(...),i,j) where i=1,... and j=1,...
to get the m-coefficients, constant b, and additional regression statistics.
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,872
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top