I have this quadratic LINEST function which analyzes a 20 year times series of free cash flows of Exxon Mobil. So the default data set size is n=20. However, many companies do not have 20 years worth of data so if I analyze a company with only 10 years of data (n=10), the LINEST function will return a #VALUE! error until I manually adjust the cell references. This is a hassle to say the least, especially when I have 10 of these LINEST functions to adjust as I don't only look at free cash flows. Below is the LINEST function as I have it now.
How do I make this function automatically adjust to the data set size when it changes?
{=TRANSPOSE(LINEST(B25:B44,$A$25:$A$44^{1,2}))}
If n changes from 20 variables to just 10, assume the cell reference changes to B25:B34 and $A$25:$A$34. How do I make this happen without having to manually do it?
Bookmarks