excel中 DATEDIF函数 结果为#NUM!

2024-12-05 13:47:54
推荐回答(4个)
回答1:

IF(AND(C19=100%,DATEDIF(E19,F19,"d")=0)
这一段的DATEDIF有问题
我是改成IF(AND(C19=100%,E19=F19)

整个公式改成以下试试
=IF(AND(C19<100%,E19-TODAY()=0),"已到期",IF(AND(C19<100%,E19-TODAY()>0),"剩余"&E19-TODAY()&"天到期",IF(AND(C19<100%,E19-TODAY()<0),"已过期"&TODAY()-E19&"天",IF(AND(C19=100%,E19=F19),"已按时完成",IF(AND(C19=100%,E19-F19>0),"提前"&ABS(DATEDIF(F19,E19,"D"))&"天完成",IF(AND(C19=100%,E19-F19<0),"延期"&ABS(E19-F19)&"天完成"))))))

回答2:

DATEDIF(E19,F19,"d")
第一次出现datedif函数的地方,E19和F19写反了

回答3:

IF(AND(C19=100%,DATEDIF(E19,F19,"d")=0)
这一段的DATEDIF有问题
我是改成IF(AND(C19=100%,E19=F19)
整个公式改成以下试试
=IF(AND(C19<100%,E19-TODAY()=0),"已到期",IF(AND(C19<100%,E19-TODAY()>0),"剩余"&E19-TODAY()&"天到期",IF(AND(C19<100%,E19-TODAY()<0),"已过期"&TODAY()-E19&"天",IF(AND(C19=100%,E19=F19),"已按时完成",IF(AND(C19=100%,E19-F19>0),"提前"&ABS(DATEDIF(F19,E19,"D"))&"天完成",IF(AND(C19=100%,E19-F19<0),"延期"&ABS(E19-F19)&"天完成"))))))

回答4:

E19和F19可能不是日期格式