Solved

Calculate XIRR and XNPV in VB.Net

Posted on 2007-11-20
8
6,307 Views
Last Modified: 2013-11-26
Does anyone know how to calculate XIRR and XNPV in VB.Net without referencing Excel.

I know there a .Net functions for IRR and NPV but I need to calculate XIRR and XNPV.
0
Comment
Question by:Estate_Master
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20325898
Here is a well tested XIRR program with VB source code:
http://www.geocities.com/alexgutierrezotero/
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 20325904
I would like to provide you the suggestions as follows:

1. Automation is a process that allows applications that are written in languages such as Visual Basic to programmatically control other applications. Automation to Excel allows you to perform actions such as creating a new workbook, adding data to the workbook, or creating charts. With Excel and other Microsoft Office applications, virtually all of the actions that you can perform manually through the user interface can also be performed programmatically by using Automation.

Excel exposes this programmatic functionality through an object model. The object model is a collection of classes and methods that serve as counterparts to the logical components of Excel. For example, there is an Application object, a Workbook object, and a Worksheet object, each of which contain the functionality of those components of Excel. To access the object model from Visual Basic .NET, you can set a project reference to the type library.

For further information, please take a look at the following article on Excel automation:

How to automate Microsoft Excel from Visual Basic .NET
http://support.microsoft.com/kb/301982/

2. List of Worksheet Functions Available to Visual Basic
http://msdn2.microsoft.com/en-us/library/bb211378.aspx
 
The list represents all of the worksheet functions that can be called using the WorkSheetFunction object.

3. There is a sample on using XIRR function in Visual Basic. You can consider to upgrade the project in VB 2005 IDE and run the project as VB.NET application

http://www.geocities.com/alexgutierrezotero/ 

0
 

Author Comment

by:Estate_Master
ID: 20336657
Thanks

I used the example and created it for XIRR.

Do you know of any of XNPV?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20336848
I just have found a C++ implementation:
http://www.codecogs.com/cog-297
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Expert Comment

by:DEWebWorks
ID: 34072490
Every article I read on this subject points to this:
http://www.geocities.com/alexgutierrezotero/

But that's a dead link :(
0
 

Expert Comment

by:barnaby-m
ID: 35933128
Does anyone on this thread have the source code?  
As DEWevWorks said above, it is a dead link :(
0
 

Author Comment

by:Estate_Master
ID: 35935720
Maybe you can get it from the cached version of that site?: http://web.archive.org/web/20091024014951/http://geocities.com/alexgutierrezotero/
0
 

Expert Comment

by:barnaby-m
ID: 35936436
Great thank you so much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get list of word ducuments in a folder 10 36
Saveas need to save a copy 16 26
Anyway to make "All" the default in the dropdown? 6 34
Runtime Error 2 29
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now