calculate linest for multiple xy pairs in a data column

yocats

New Member
Joined
May 16, 2011
Messages
1
Hi Folks,

I am interested in calculating a linest (slope y int r2, etc) for pairs of data that I receive in one long block of three columns (site, year, data). I can do this calculation the hard way by cut/paste the linest array for each xy pair down the xls sheet and use tdist fxn to get the r2. However, I'd like to get VBA code to run through the list and run linest for each new id in first column and compile the results in a table in this or another worksheet. My data are arranged as below. Much thanks for any help.

site year data
E4723-15A 1989 8.17
E4723-15A 1990 8.45
.
.
E4723-15A 2010 9.01
E4723-18A 1989 8.94
E4723-18A 1990 9.05
.
.
E4723-18A 2010 10.59
.
.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,509
Messages
6,179,192
Members
452,893
Latest member
denay

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