Solved

Calculate XIRR and XNPV in VB.Net

Posted on 2007-11-20
8
6,358 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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