📜  迄今为止的 Excel 周数 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:42.188000             🧑  作者: Mango

代码示例1
'ISO_8601: Week date
'the week with the starting year's first Thursday in it
' Cell D2 == Week Nr
' Cell D3 == Year Nr
'First day of week
=IF(WEEKDAY(DATE(D3,1,1),2)<=4,DATE(D3,1,1)-WEEKDAY(DATE(D3,1,1),2)-1,DATE(D3,1,1)+(7-WEEKDAY(DATE(D3,1,1),2))+1)+(D2-1)*7
'last day of the week 
=IF(WEEKDAY(DATE(D3,1,1),2)<=4,DATE(D3,1,1)-WEEKDAY(DATE(D3,1,1),2)-1,DATE(D3,1,1)+(7-WEEKDAY(DATE(D3,1,1),2))+1)+D2*7-1