ANmarS - Search results

Excel/VBA expert since Sep 1997 (20 years 9 months)

We are moving ...

We are moving to another location, better, faster and more resources .... check it out ANmar.Systems

1 Q & A posts tagged with npv

Apr 11

How do you add an npv function into vba for cash flows?

I have interest rate as 10% and future value of 1,000. I've already done everything in VBA that allows excel to show 10 years of present values, future values and compounding factors. I just don't know how to add a function in for NPV so that a specific cell would add up all the present values that were already calculated with the formula pv = fv / (1+irate) ^ 1 using VBA and not excel's npv function or sum of values.


You have several options here
1- Use the mathematical way to calculate the NPV
2- Use some temporary cells to set the values and use NPV in another cell do calculation, then read the result
3- And the one I used a lot is to use WorkSheetFunction object to use Excel function in VBA, like this
NewValue = Worksheetfunction.NPV( MyRate, MyAmount, etc)

If none of those helped, that means I didn't get your question right, reply me here.


Sunday 4/11/2010 4:36:44 PM