Using XIRR function in VBA ?

  • Thread starter Thread starter martonec
  • Start date Start date
M

martonec

Hi all,
does anyone have a working example of the XIRR function running in
VBA or VB ?
I am pulling what's left of my hair out here. I can run the function ok
but the result is not what I'm expecting. I think I'm obviously going
wrong somewhere along the line. Any help would be greatly appreciated.

Tony
 
Hi all,
does anyone have a working example of the XIRR function running in
VBA or VB ?
I am pulling what's left of my hair out here. I can run the function ok
but the result is not what I'm expecting. I think I'm obviously going
wrong somewhere along the line. Any help would be greatly appreciated.

Tony

It runs like any other worksheet function, EXCEPT you should have set a
reference to APTVBAEN.XLA and you would just call it directly (no
application.worksheefunction preceding).

e.g.

Dim res as double

res = xirr(values, dates, holidays)


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XIRR in VBA? 9
XNPV in VBA 2
XIRR function breaking down (#NUM) 2
XIRR in VBA 1
Geting around XIRR error 27
xirr function 1
XIRR #NAME? error - Toolpak IS installed 1
XIRR Function Using Months Instead of Years 9

Back
Top