Explanation

This formula uses two expressions in a single array inside the SUMPRODUCT function.

Excel formula: List holidays between two dates

Excel formula: Count dates by day of week

Excel SUMPRODUCT function