是180天还是6个月公式不一样,附件发你邮箱,你查收下,仿照公式修改。
用DATEDIF函数,具体可为=180-(DATEDIF(选中开票日期那一栏,NOW(),"D")
设你开票的日期在D2,剩余天数在E2,则请在E2输入公式:
=IF(ISERR(DATEDIF(TODAY(),D2+180,"D")),"已过期",DATEDIF(TODAY(),D2+181,"D"))
即可。
使用下列公式之一
=IF(TODAY()>D2+180,"已过期",D2+180-TODAY())
或
=IF(TODAY()<=D2+180,D2+180-TODAY(),"已过期",)
或
=IF(TODAY()>D2+180,"已过期",DATEDIF(TODAY(),D2+180,"D"))
或
=IF(TODAY()<=D2+180,DATEDIF(TODAY(),D2+180,"D"),"已过期",)
设你开票的日期在D2,剩余天数在E2,则请在E2输入公式:
=IF(ISERR(DATEDIF(TODAY(),D2+180,"D")),"已过期",DATEDIF(TODAY(),D2+181,"D"))
即可。