I'm trying to adjust how much of a data my formula looks at depending on another variable.
An example would be having 20 years worth of returns =IRR(A2:A22)
I'd like to add a variable that you change depending on how many years you would want to look at. Lets say we only wanted to look at the first 10 years how would I get my formula to automatically find the data for =IRR(A2:A12) ?