Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Excel 2003 to Excel 2010 LINEST formula

Posted on 2013-11-21
8
Medium Priority
?
1,240 Views
Last Modified: 2013-12-04
My formula =INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,3)

Works great in 2003 but when I run the sheet in 2010 the value's do not populate correctly. Was anything change from 2003 to 2010 in this formula?
0
Comment
Question by:Keef4000
  • 3
  • 3
  • 2
8 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 39667576
Seems to work OK for me - I don't think anything changed in Excel 2010 that would affect LINEST - what do you mean "the values do not populate correctly" - do you get errors or the wrong results?

regards, barry
0
 

Author Comment

by:Keef4000
ID: 39667608
I figured something out that is very interesting. So the formula works like you said. However, I have 3 formula's like the one above.

Excel 2003 (This is what its suppose to return)


=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,1)
            Returns: 0
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,2)
            Returns: -0.000917151
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,3)
            Returns: 0.084003538


However, In Excel 2010

=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,1)
            Returns:  -0.000917151
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,2)
            Returns: 0
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,3)
            Returns: 0.084003538


As you can tell the 1 formula and 2 formula are flipped in 2010. For kicks and giggles I reversed formula 1 and 2 on 2010 and My results are correct. I don't understand how that is possible. Example of my flip are below:

=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,2)
            Returns: 0
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,1)
            Returns: -0.000917151
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,3)
            Returns: 0.084003538
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 39667730
OK, I see what you mean but I have no idea why these are different - I don't have Excel 2003 but it seems that there is a difference even between Excel 2007 and Excel 2010 (and the issue is with LINEST not INDEX because I took out the latter and there are differences between what LINEST returns in both versions).

I'll see if anyone else can help out........

regards, barry
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 39668144
Microsoft was chastised by the academic community for errors in their statistical functions, including LINEST and LOGEST. As a result, they have revisited the code for those functions on several occasions, with the result being that you get different answers depending on which version you are using. In most cases in my experience, the differences are minor.

The most extensive rewrite occurred in Excel 2013, where a third-party firm with strong ties to academia compared the results of the revised algorithms to widely accepted statistical software packages, and found excellent agreement. In some cases, the new algorithm was noticeably slower than the original one--so the old version was retained and the new version got a different name.

Bottom line: this is a known problem. Description of the LINEST function in Excel 2003 and in later versions of Excel
0
 
LVL 81

Assisted Solution

by:byundt
byundt earned 2000 total points
ID: 39669762
In your desired formula, what is the purpose for listing a duplicate set of independent variables?
=INDEX(LINEST(M$21:M$23,$L$21:$L$23^{1,1},,TRUE),1,3)
In your formula, the ^{1,1} produces two sets of L21:L23 as values of "x" variables. But they aren't independent, so one of the two sets should be thrown out of a proper correlation. That's what Excel 2013 does--throw out the first set of L21:L23 by returning 0 for the coefficient.

To get the constant term (y-intercept), I might have used:
=INDEX(LINEST(M$21:M$23,$L$21:$L$23,,TRUE),1,2)
0
 

Author Closing Comment

by:Keef4000
ID: 39677874
Thanks for the information. I think we will have to stay with 2003 then.
0
 
LVL 81

Expert Comment

by:byundt
ID: 39677908
I think we will have to stay with 2003 then
Ooh! That's the wrong takeaway from Microsoft's KnowledgeBase article. They have finally fixed the problems with LINEST and other statistical functions in Excel 2013. Clinging to Excel 2003 will only perpetuate the possibility of error.
0
 

Author Comment

by:Keef4000
ID: 39696519
Thank you for the recommendation I will revisit 2013 then. We have highly statistical data that has to return consistent variable throughout many different condition so the numbers have to be correct or we cannot ship parts out the door. We have considered writing our own formula as well which might be the direction to go.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question