Please Register to Remove these Ads
I created a user defined function called FilterXIRRNew in Excel 2003 that takes in a bunch of arrays, does some processing and filtering and finally calls the built in XIRR function in excel to calculate the IRR for a series of cash flows. The function worked fine in Excel 2003
Code:
Public Function FilterXIRRNew(FilteredCF, FilteredDates, FilteredVal, valDate, InvestMultiple)
' Bunch of code here followed by calling the XIRR function
FilterXIRRNew = Application.Run("xIRR", TrueCF, TrueDates, GuessIRR)
End Function
This function worked fine in Excel 2003. Now that I have opened the file in 2007, FilterXIRRNew is no longer working properly. The code works fine upto the line where it calls the in built XIRR function. I have enabled Macros in Excel 2007 and also installed the Add-In that contains the built-in XIRR function. The XIRR function works properly byitself. I am only having trouble with my user defined FilterXIRR function.