See my summary above
It's hard to say exactly why you're encountering this error without seeing your spreadsheet, but I don't think the problem is IRR-specifically, but rather an issue with your data. The IRR function usually returns #NUM! if it can't calculate an Internal Rate of Return. I wrote about #VALUE! errors a while back, so this article https://www.accountingweb.com/technology/excel/resolving-value-errors-in... may help you clear up the issue. Or feel free to elaborate further about your use of IRR and I'll be glad to see if I can help you get this resolved.