Solved

Calculate XIRR and XNPV in VB.Net

Posted on 2007-11-20
8
6,270 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 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

19 Experts available now in Live!

Get 1:1 Help Now