0

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) ?

0

1 Answer 1

2

Let's assume that the year "variable" is in cell A1. It could be any cell, but for this example, A1:

=IRR($A$2:INDEX($A:$A,$A$1+2))

Notice that $A$1 is in the formula. You change that to your year variable.

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect! It totally works, you really are my Excel Hero.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.