Forum Discussion
Hogstad_Raadgivning
Nov 28, 2024Steel Contributor
Num error using XIR
Hello,
Attached is a workbok with 2 examples using XIR function. To calculate internal rate of return. One returns #NUM error.
What is the reason for that?
Best regards
Geir
Consider following:
- Incorrect Guess: The XIRR function may need a different initial guess to start the iteration process. You can provide a guess as the last argument in the XIRR function, like XIRR(values, dates, guess).
- Non-cash Flow: The XIRR function requires at least one negative and one positive cash flow to calculate the internal rate of return. Ensure your data includes both inflows and outflows.
- Order of Dates: The dates should be in chronological order. Ensure your dates are sorted correctly.
- Excel Version: If you're using an older version of Excel, there might be issues with the function itself. Ensure your Excel is up-to-date.
- Hogstad_RaadgivningSteel Contributor
Thank you, I read that article. And I can not see that is one of those, it might be my "Inncorecct guess". I also got #NUM error if the number of columns for dates and values wa different.
I guess first value shall be negative (or missed)
- Hogstad_RaadgivningSteel Contributor
That might be a solution. It worked if I changed my first value to a negative number. It also worked if I expanded my data area with more negative columns. I made a random calculator, to check the pattern. But still confused.