Excel 两个日期之间计算法定假日有几天

2024-12-18 04:46:58
推荐回答(1个)
回答1:

不含国定假日=SUMPRODUCT(N(WEEKDAY(ROW(INDIRECT(A$2&":"&B$2)))={1,7}))

含国定假日=SUMPRODUCT(N(WEEKDAY(ROW(INDIRECT(A$2&":"&B$2)))={1,7}))+SUMPRODUCT((F$2:F$99>=A2)*(F$2:F$99<=B2))