Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem using XNPV from VBA
Hello, I have this (to me) strange situation:
Dim aRangeValues() As Double, aRangeDates() As Date The two arrays are set to the foll. values (dates are in dd/mm/yyyy): aRangeValues(1) | aRangeValues(2) | aRangeValues(3) | aRangeValues(4) -1721.9482672 | 194.6875 | 194.6875 | 2194.6875 aRangeDates(1) | aRangeDates(2) | aRangeDates(3) | aRangeDates(4) 27/09/2002 | 30/09/2002 | 30/09/2003 | 30/09/2004 If I try to calculate the NPV (using XNPV - due to different intervals): Val = Application.Run("XNPV", 0.05, aRangeValues, aRangeDates) I get the #VALUE! error! Just to check the situation, I tried to calculate: Val = Application.Run("XIRR", aRangeValues, aRangeDates) and I get a correct 0.262366098165512 I tried to use the XNPV function in a cell, and it works! Any idea? Thanks, Dario |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
NPV vs XNPV | Excel Worksheet Functions | |||
XNPV Function | Excel Worksheet Functions | |||
XNPV | Excel Discussion (Misc queries) | |||
NPV vs. XNPV | Excel Worksheet Functions | |||
xnpv with actual/360 | Excel Worksheet Functions |