IRR calculation: have excel IRR function choose the amount of cells depending on the projection years input box

I am trying to create a template that I can use for certain type of modeling to automate things.

One of the things I need in there is an IRR calculation. I have currently set it up that the dates populate off the projection year input cell. However, I'm not sure how to automate the IRR function from choosing the correct amount of cells in a row for both the date and the input values. I do not know macros, so I was wondering if there was another way of doing this? Thanks

4 Comments
 
mossy695Example:

Dates in an array from C4:C85 Cash flows in an array from D4:D85 Date input cell in I2 Formula is: =IRR(INDIRECT(CONCATENATE("D4:D",MATCH(I2,C4:C85)+3)))

That or you can be normal and use xirr.

 

xirr still need an input range. I don't like indirects personally but mossy's approach probably works - i'd do something like (using same setup as above)

=XIRR(D4:offset(D4,0,I2-1),C4:offset(C4,0,I2-1))

 

Tempora et incidunt et perspiciatis. Nemo architecto illo voluptatibus et. Assumenda cum debitis reiciendis modi eius voluptatem magnam. Perferendis voluptatum molestiae voluptatibus et animi ratione. Libero perspiciatis veniam omnis consectetur qui.

Excepturi ea itaque corrupti voluptas. Ea ex nulla natus id vel ad. Ut praesentium neque nesciunt nisi est autem expedita. Ipsam exercitationem quis vel commodi officiis.

Sequi consequuntur pariatur eaque reprehenderit. Ipsam voluptatum molestiae voluptatibus harum. Enim hic maiores labore soluta inventore quidem.

Quo architecto et accusamus iure fugiat voluptatum similique temporibus. Dolorem numquam nesciunt quas sunt. Id ducimus corporis ut nemo et recusandae. Quod at excepturi odit molestias quia iusto.

Career Advancement Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.1%

Overall Employee Satisfaction

June 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Morgan Stanley 02 98.8%
  • Evercore 01 98.3%
  • BMO Capital Markets 12 97.7%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.3%
  • Goldman Sachs 01 97.7%
  • JPMorgan No 97.1%

Total Avg Compensation

June 2026 Investment Banking

  • Vice President (15) $434
  • Associates (44) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (13) $156
  • 1st Year Analyst (79) $150
  • Intern/Summer Analyst (73) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
BankonBanking's picture
BankonBanking
99.0
3
kanon's picture
kanon
99.0
4
Secyh62's picture
Secyh62
99.0
5
CompBanker's picture
CompBanker
98.9
6
Betsy Massar's picture
Betsy Massar
98.9
7
DrApeman's picture
DrApeman
98.9
8
dosk17's picture
dosk17
98.9
9
GameTheory's picture
GameTheory
98.9
10
bolo up's picture
bolo up
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”