Excel“您为该函数输入了太多参数”

Excel“您为该函数输入了太多参数”

现行公式- 在职的

=IF(DATEDIF(TODAY(),U6,"d") > 7,ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)&IF(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0) > 1," 周和 "," 周和 ")&DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7)&IF(DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7) > 1," 天"," 天"),IF(DATEDIF(TODAY(),U6,"d") = 1,"明天",DATEDIF(TODAY(),U6,"d")&IF(DATEDIF(TODAY(),U6,"d") > 1," 天"," 天")))


新配方- 破碎的

=IF(DATEDIF(TODAY(),U6,"d") > 7,IF(DATEDIF(TODAY(),U6,"d")/7 = 2,"今天",ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)&IF(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0) > 1," 周和 "," 周和 ")&DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7)&IF(DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7) > 1,"天","天"),),IF(DATEDIF(TODAY(),U6,"d") = 1,"明天",DATEDIF(TODAY(),U6,"d")&IF(DATEDIF(TODAY(),U6,"d") > 1," 天"," 天")))


我想添加的内容

我已经实现了“明天”,但现在我想实现“今天”。为了确定是否是“今天”,我添加了付款之间的时间间隔,如果是今天,则跳转到下一个日期,或者在我上面的版本中,我采用了周数间隔方法。

我已经多次分解函数,但我看不出问题所在。公式的长度是否有限制?

答案1

问题出在你的公式的这一部分:

IF(DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7) > 1 ,"days","day"),)
'  ^1st                                                                    ^2nd   ^3rd   ^4th

anIF有 4 个参数,而 anIF语句只有 3 个参数,因此只需像这样使用它:

IF(DATEDIF(TODAY(),U6,"d")-(ROUNDDOWN(DATEDIF(TODAY(),U6,"d")/7,0)*7) > 1 ,"days","day"))

相关内容