Haneyg
New Member
- Joined
- Dec 5, 2009
- Messages
- 15
Hey guys, I need to calculate the NPV using a bit of VBA code. I think I could figure it out if there were a set amount of variables, but the trick is to have a macro ready to run and calculate for any "n" number of cashflows. Optimally I would just import the data into excel and run the macro. Here is the email I received from the client for reference:
I need a program that computes the NPV for n cashflows using VBA in an Excel spreadsheet. I'll input how many cashflows (time periods – in years) that will be entered and the interest rate. Once the data has been entered I want a button to calculate the NPV. Thanks.
I was thinking of attempting to count cells to find out how many total cashflows, but I'm not sure that would even work.
Thanks for the help guys!
I need a program that computes the NPV for n cashflows using VBA in an Excel spreadsheet. I'll input how many cashflows (time periods – in years) that will be entered and the interest rate. Once the data has been entered I want a button to calculate the NPV. Thanks.
I was thinking of attempting to count cells to find out how many total cashflows, but I'm not sure that would even work.
Thanks for the help guys!