Hi All,
I am trying to figure out how I would assign a value to calculations within an array for payback period formula.
For those unaware of the formula, essentially you have an initial investment followed by periodic cash flows which overtime hopefully offset your initial investment. Since there is no excel formula for this and I would like it to work as a macro, I have started this function which users input the initial investment followed by the range of cash inflows. What I am trying to do is subtract each of the cash flows from the initial (absolute) investment, for each cash flow that doesn't equal the initial, i would like to assign a value of 1 (year), then go onto the next value in the array and do the same until the cash inflows have equaled or just exceeded the initial investment.
when it has exceeded the initial investment, then the formula would take the difference of that cash flow from the running total which would be ((initial investment-sum of cashflows)/ that cash flow)
It gets sloppy at the end where I cannot figure out what I am doing wrong to get this, it needs to be some fraction of years
Thank you in advance for your help
Cheers....Lax2734
Bookmarks