How can I adjust the IRR formula depending on how many years I'm looking at.
My cash flows are starting in cell J13 and depending on the input factors (years) the last cell can be anything from K13 (1 year) to AH13 (25 years).
I have worked out how to define the last cell by doing =ADDRESS(ROW(I12),10+(COUNT(J2:AQ2)-1)) - Row 2 are the relevant years
Can i somehow tell excel to do =XIRR(I12:S12,I2:S2) where i substitute to something like =XIRR(I12;ADDRESS(ROW(I12),10+(COUNT(J2:AQ2)-1)).....
The aim is that excel picks up the last cell that contains a data and puts this cell reference into the XIRR formula. Is that possible without VBA?
Bookmarks