Count hours per period from a large list

As this is now more about compatibility with Excel, I moved the questions to Compatibility issues with Microsoft Excel 2019