Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XIRR in Access

Status
Not open for further replies.

AccessVB

MIS
Jun 23, 2002
82
US
Need to calculate XIRR in Access (not IRR), if anyone can point me in the right direction I would greatly appreciate your help. Thanks in advance.
 
Is this any use (?):
Microsoft said:
If this function is not available, run the Setup program to install the Analysis ToolPak. After you install the Analysis ToolPak, you must enable it by using the Add-Ins command on the Tools menu.

 
Thanks, but I think that applies to Excel..not MS Access..
 
[blush]
I suppose you saw the post on this in Google Groups ...
 
Not really Remou, can you tell me if theres a solution on there?
 
Here is the code posted in:
Also references:
Alex Temesov in comp.lang.basic.visual.misc


Code:
Public Sub TestXirr()


Dim objExcel As Excel.Application


Dim p(4) As Double
p(0) = -10000
p(1) = 2750
p(2) = 4250
p(3) = 3250
p(4) = 2750


Dim d(4) As Date
d(0) = #1/1/1998#
d(1) = #3/1/1998#
d(2) = #10/30/1998#
d(3) = #2/15/1999#
d(4) = #4/1/1999#


Set objExcel = New Excel.Application
objExcel.RegisterXLL objExcel.Application.LibraryPath & "\ANALYSIS\ANALYS32.XLL"
Debug.Print objExcel.Run("XIrr", p, d)  ' Result:  0.374858599901199
objExcel.Quit
Set objExcel = Nothing


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top