我需要一个IF语句来搞清楚:
=If(WEEKNUMBER is between STARTDATE and ENDDATE;1;0)
为了测试,我们可以说:
A1 = Startdate
B1 = Enddate
C1 =周数
D1 = IF-statement
答案 0 :(得分:1)
D1使用WEEKNUM()函数:
=if(and(weeknum(A1) <= C1; C1 <= weeknum(B1))=true; 1; 0)
例如:
__| A | B | C | D |
1 | 1/1/2016 | 1/16/2016 | 2 | 1 |
2 | 1/1/2016 | 1/16/2016 | 4 | 0 |