calculating slope for arrays

Lino

Active Member
Joined
Feb 27, 2002
Messages
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
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
=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
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top