If the XIRR function in Excel is returning a value of zero while the IRR function works correctly, there are a few potential reasons for this issue:
- Cash Flow and Dates: Ensure that your cash flow values (the first argument of XIRR) contain at least one positive and one negative value. If this condition is not met, XIRR will return an error or zero. Additionally, check that the dates (the second argument) correspond correctly to the cash flows and that they are in the correct format.
- Guess Parameter: If you are using the optional guess parameter (the third argument), try omitting it or using a different value. The default guess is 0.1 (10 percent). If the guess is too far from the actual result, it may lead to incorrect calculations.
- Date Format: Make sure that the dates are not entered as text. You can use the DATE function to ensure they are recognized as valid dates. For example, use
DATE(2021, 1, 1)for January 1, 2021. - Excel Version Issues: Since you mentioned that the same file works in Google Sheets and WPS, there might be a compatibility issue or a bug in the specific version of Excel you are using. Ensure that your Excel is updated to the latest version.
- Error Handling: If there are any errors in the data (like invalid dates or mismatched lengths of cash flows and dates), XIRR may return an error or zero. Check for any inconsistencies in your data.
If you have checked all these factors and the issue persists, consider reaching out to Microsoft support for further assistance, as it may be a specific issue with your Excel installation.
References: