我正在尝试将以下公式转换为 C 但未能获得正确的语法。基本上,我使用今天的日期减去一组定义的日期来查看 mod 余数是否与 28 天的轮换匹配,如果为真则提供所需的答案。下面是我试图转换为 C 的工作 Excel 公式...
=IF(OR(
MOD(TODAY()-DATE(2013,1,7),28)=0,
MOD(TODAY()-DATE(2013,1,16),28)=0,
MOD(TODAY()-DATE(2013,1,25),28)=0,
MOD(TODAY()-DATE(2013,2,4),28)=0,
MOD(TODAY()-DATE(2013,2,13),28)=0,
MOD(TODAY()-DATE(2013,2,22),28)=0)=TRUE,"Option1",IF(
OR(
MOD(TODAY()-DATE(2013,1,9),28)=0,
MOD(TODAY()-DATE(2013,1,18),28)=0,
MOD(TODAY()-DATE(2013,1,28),28)=0,
MOD(TODAY()-DATE(2013,2,6),28)=0,
MOD(TODAY()-DATE(2013,2,15),28)=0,
MOD(TODAY()-DATE(2013,2,25),28)=0)=TRUE,"Option2",IF(
OR(
MOD(TODAY()-DATE(2013,1,11),28)=0,
MOD(TODAY()-DATE(2013,1,21),28)=0,
MOD(TODAY()-DATE(2013,1,30),28)=0,
MOD(TODAY()-DATE(2013,2,8),28)=0,
MOD(TODAY()-DATE(2013,2,18),28)=0,
MOD(TODAY()-DATE(2013,2,27),28)=0)=TRUE,"Option3",IF(
OR(
MOD(TODAY()-DATE(2013,1,14),28)=0,
MOD(TODAY()-DATE(2013,1,23),28)=0,
MOD(TODAY()-DATE(2013,2,1),28)=0,
MOD(TODAY()-DATE(2013,2,11),28)=0,
MOD(TODAY()-DATE(2013,2,20),28)=0,
MOD(TODAY()-DATE(2013,3,1),28)=0)=TRUE,"Option4","Not Required"))))
有什么好心人能帮我指引正确的方向吗?