I am trying to write a vba macro that calls xirr on an array constructed from arguments. However it always return 0. It works perfectly if I have a cell formula with xirr on the exact same data.
A somewhat minimal version of the macro follows:
I am calling it on the following spreadsheet -![]()
Please Login or Register to view this content.
The Xirr cell correctly shows .127 but the myXirr always shows 0 regardless of its arguments (I know the 2 shouldn't be exactly the same in my simplified version with the 30 argument above, but they should be close enough).
1-Jan 1000 1-Feb 100 1-Mar 100 =myXirr(-B1,A1,B2,A2,30,2,B4,A4,0.1) 1-Apr -1233.31 =Xirr(b1:b4,a1:a4)
Thanks for any help.
Bookmarks