Hi,
I want to return the linear regression slope (in cell N4) of the last 5 values in a data set. The data set begins on row 8 in columns C (x values) and AA (y values). The last row with data in these columns will vary which is why I can't use the cell formula:
Can anyone modify this formula to work regardless of the number of rows? And although I stated that I wanted the linear regression slope for the last 5 values, it would be great I could set the number of values included the calculation based on the value in cell AA2.
Thanks,
Art
I want to return the linear regression slope (in cell N4) of the last 5 values in a data set. The data set begins on row 8 in columns C (x values) and AA (y values). The last row with data in these columns will vary which is why I can't use the cell formula:
Code:
=SLOPE(C255:C259,AA255:AA259)
Can anyone modify this formula to work regardless of the number of rows? And although I stated that I wanted the linear regression slope for the last 5 values, it would be great I could set the number of values included the calculation based on the value in cell AA2.
Thanks,
Art