Forum Discussion
Formula REGR.LIN output problem
- Mar 16, 2024
Sorry, forgot to mention. First you need to select both cells, after that enter the formula in formula in formula bar, next Ctrl+Shift+Enter.
Alternatively enter the formula into one cell, enter, select this and next cell, Ctrl+Shift+Enter
The REGR.LIN function in Excel returns an array containing two values: the slope and the y-intercept of the linear regression line. However, when you enter the formula directly into a single cell, Excel only displays the first value of the array, which is the slope, in that cell. The second value (y-intercept) is still calculated, but it's not displayed because the cell can only show one value at a time.
To display both the slope and the y-intercept in separate cells, you can use array formulas or split the REGR.LIN formula into two separate formulas.
Here's how you can maybe split the REGR.LIN formula to display both values (the function names are typically translated into Italian):
In cell H6 (for slope):
=INDICE(REG.LIN(F5:F12;E5:E12;VERO;FALSO);1)
In cell I6 (for y-intercept):
=INDICE(REG.LIN(F5:F12;E5:E12;VERO;FALSO);2)
And for the concatenated formula:
In cell H6:
="Pendenza: " & INDICE(REG.LIN(F5:F12;E5:E12;VERO;FALSO);1) & ", Intercetta: " & INDICE(REG.LIN(F5:F12;E5:E12;VERO;FALSO);2)
Ensure that semicolons (;) are used as argument separators in the formulas.
The text was created with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.