以周五为基准,取上周五至本周四的时间段公式
判断规则:
先判断当天,是否属于(周五、六、日)
“是” 则取上周五 至 本周四
“否” 则取上上周五 至 上周四
复合公式如下:
IF(OR(0=WEEKDAY(today()),6=WEEKDAY(today()),5=WEEKDAY(today())) ,CONCATENATE(DATEINWEEK(today(),-1)-9," 至 ",DATEINWEEK(today(),-1)-3) , concatenate( DATEINWEEK(today(),-1)-16," 至 ",DATEINWEEK(today(),-1)-10))
以当天为:2024-01-30(周二)为例,执行结果如下:
--------------------------------完--------------------------------------