![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 429
|
I am trying to calculate the slope of a line with known arrays for the y values. The x values are simply independent consecutive numbers counting the y data points beginning with the number 1. I am trying to do this programatically.
y array ={10,13,15,12,18,19} and x array ={1,2,3,4,5,6,} Can anyone help. Thanks, Lino |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
=INDEX(LINEST({10,13,15,12,18,19},{1,2,3,4,5,6}),1,1)
or, simply... =INDEX(LINEST({10,13,15,12,18,19}),1,1) ...finally, if you intend to display the slope in a single cell you don't need the INDEX worksheet function... Just use... =LINEST({10,13,15,12,18,19}) [ This Message was edited by: Mark W. on 2002-04-02 13:15 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|