XL: LINEST Function Returning Only One Value

Last reviewed: February 2, 1998
Article ID: Q99639
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.x, 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 2.x, 3.x, 4.x, 5.0, 5.0a
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel 98 Macintosh Edition

SUMMARY

The LINEST() function will return only one value, the slope, when you enter the formula with one cell selected. To obtain both the slope and the y- intercept, you must select two adjacent horizontal cells and then enter the LINEST() formula as an array. The syntax of the LINEST() formula is

   =LINEST(known_y's,known_x's)

where "known_y's" and "known_x's" are ranges on the worksheet containing the y-values and the x-values, respectively.

You must enter the LINEST() formula as an array. To enter a formula as an array, press CTRL+SHIFT+ENTER in Microsoft Excel for Windows, or COMMAND+RETURN in Microsoft Excel for the Macintosh.

MORE INFORMATION

To return the additional regression statistics, select a range of cells consisting of n columns (where n represents the number of known x's) and 5 rows. Because LINEST is an array formula, you must enter the function as an array: press CTRL+SHIFT+ENTER in Microsoft Excel for Windows, or COMMAND+RETURN in Microsoft Excel for the Macintosh. Refer to the LINEST() section of the Microsoft Excel Function Reference for an illustration that depicts the order in which the additional regression statistics are returned.

REFERENCES

"Microsoft Excel Function Reference," version 4.0, pages 254-258 "Microsoft Excel User's Guide 1," version 4.0, pages 153-166 "Microsoft Excel Function Reference," version 3.0, pages 138-141 "Microsoft Excel User's Guide," version 3.0, pages 277-289


Additional query words: 2.1 2.10 3.0 3.00 4.0 4.00 4.0a 4.00a 5.00
5.00a 5.0c 5.00c 7.00 8.00 97 98 XL98 XL97 XL7 XL5 XL4 XL3 arrays 1
Keywords : xlformula
Version : WINDOWS:2.0,3.0,4.0,5.0,5.0c,7.0,97; MACINTOSH:2.0,3.0,4.0,5.0,98
Platform : MACINTOSH WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.