-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XIRR returning warnings and incorrect result #1120
Comments
I should add that when dates are presented in the required ascending order then the correct result is returned |
Can anyone/someone comment on this issue? I'm up for submitting a pull request for a fix which checks date order and returns VALUE but I'd like to know first that the community agrees it's desirable |
@MarkBaker @PowerKiKi any comments? |
According to https://support.office.com/en-us/article/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d:
So feel free to submit a PR, but we should stick to the official docs as much as possible and allow any order of dates |
Will do. I see my comments above are incorrect. I'm restating here.
@PowerKiKi - Can you label as |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Current version of PhpSpreadsheet returns expected result with no warnings. |
This is:
What is the expected behavior?
I would expect the result to be 0.13796 (as calculated using XIRR in Excel)
However, this is because my dates are given in non ascending order and the document is clear that this is wrong. I believe a VALUE error should be returned.
What is the current behavior?
Lots of warnings given
The result given is 0.16448
What are the steps to reproduce?
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Which versions of PhpSpreadsheet and PHP are affected?
PHP 7.2
Latest PHPSpreadsheet 1.8.2
The text was updated successfully, but these errors were encountered: