Forum Discussion

JonAust's avatar
JonAust
Copper Contributor
Feb 22, 2023
Solved

How to calculate NPV for regular intervals but varying dates

Hi everyone, I am trying to create a formula to calculate NPV for multiple properties each with a different start and end date. The properties are combined into one spreadsheet, each column represent...
  • JoeUser2004's avatar
    JoeUser2004
    Feb 23, 2023

    JonAust 

     

    Note a correction to the NPV formula in my previous posting.  See the ERRATA explanation below.

     

    The following demonstrates one implementation:

     

    Key Formulas:

    D2: =NPV($C$10, IF($E$1:$AC$1>=B2, IF($E$1:$AC$1<C2, E2:AC2)))*(1+$C$10)

    Copy D2 into D3:D7

     

     

    The formula must be array-entered (press ctrl+shift+Enter instead of just Enter) in some versions of Excel.

     

    Ostensibly, the formula discounts cash flows to the first non-zero month on or after the start date.

     

    Note that for Property 2 and 6, the first non-zero month is Jan'23, not the earlier start dates of Sep'20 and Jun'22.

     

    -----

     

    Since E1:AB1 contain first-of-the-month dates, we would like the second condition to be

    EOMONTH($E$1:$AB$1, 0)<=C2

    However, that does not work in my version of Excel.  That is, not all Excel functions work as expected in array formulas -- a defect, IMHO.  You might try it in your version.

     

    The work-around is to add column AC, and to use the condition $E$1:$AC$1<C2 .

     

    -----

     

    ERRATA....  In a previous posting, the formula of the form NPV(B$2, C3:I3) is incorrect because Excel NPV discounts the first cash flow.  Effectively, that discounts cash flows to the month before the first one.  Multiplying by 1+B$2 corrects for that.

     

    That correction has been incorporated in the implementation above by multiplying NPV(...) by 1+$C$10.

Resources