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
.
.
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
.
.