Hello,

I am aware that you can use the following codes to get the last row number/value in the row

=MATCH(9.9E+307,A:A,1)  <-------- To get the row number


=VLOOKUP(9.9E+307,A:A,1) <-------- To get the value in the last row number
However, I'm trying to utilize this as part of another function and I keep getting errors.

I am trying to use it as part of the following:

=LINEST(C2:C9886,A2:B9886,TRUE,TRUE)
Here you can see that my last datacell is row# 9886 but this will change everytime I get new data from my analysis. I would like to, somehow, use the =match() function inside of that LINEST function to automatically lookup what the last number is in any given column and do the calculation that way, i.e:

=LINEST(C2:MATCH(9.9E+307,C:C,1),A2:MATCH(9.9E+307,B:B,1),TRUE,TRUE)
This obviously doesn't work.

Can anyone help?