Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: calculating slope for arrays

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    429
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =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 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •