发布网友 发布时间:2022-04-23 04:59
共3个回答
热心网友 时间:2022-06-15 17:42
输入以下公式
=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=6)*(MOD(DAY(ROW(INDIRECT(A1&":"&B1))),2)=1))+SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6)*1)
得到2011-1-1到2011-5-1之间符合条件的天数。
公式中,
WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=6表示符合日期序列符合星期六的条件;MOD(DAY(ROW(INDIRECT(A1&":"&B1))),2)=1)表示日期为单数的条件;
两个相乘,即为周六且为单号的天数。
详见附图
热心网友 时间:2022-06-15 17:43
=SUM(IF((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=6)*(MOD(DAY(ROW(INDIRECT(A1&":"&B1))),2)),1,0))+SUM(IF((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6),1,0))热心网友 时间:2022-06-15 17:43
=SUM(N((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<7))-SUM((WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=6)*MOD(DAY(ROW(INDIRECT(A1&":"&B1)))-1,2)),数组公式,ctrl+shift+enter输入