I am trying to create a function to calculate the NPV based on X periods of equal cashflow.
Obviously the NPV function works as = NPV(10%,cashflow1, cashflow2, cashflow3.........) etc.
I wish the function be like so : function NPV_D (Rate, total_cashflow, periods)
Each months cash flow would be total_cashflow/term so equal.
The problem come in that the equal cashflow could range from say 6 months to 62 months.
What is the best way to do this. Am I correct in assuming that I will need to use an array ?
Any help most appreciated - even to be pointed in the right direction woul be great.