Solved

Calculate XIRR and XNPV in VB.Net

Posted on 2007-11-20
8
6,322 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 55

Expert Comment

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

770 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