尽管快表提供了周数的函数,但是还有很多时候需要在表格内计算指定日期的周数,可以用下面的函数公式来得到周数
- =IF(AND(WEEKDAY(DATE(YEAR(A1),1,1),2) > 1,FLOOR(DATEDIF(DATE(YEAR(A1),1,1),A1+WEEKDAY(DATE(YEAR(A1),1,1)-8,2),"D")/7,1)=0), FLOOR(DATEDIF(DATE(YEAR(A1)-1,1,1),DATE(YEAR(A1),1,1)+WEEKDAY(DATE(YEAR(A1)-1,1,1)-8,2),"D")/7,1), FLOOR(DATEDIF(DATE(YEAR(A1),1,1),A1+WEEKDAY(DATE(YEAR(A1),1,1)-8,2),"D")/7,1))
复制代码
|
|
hessen