设你开票的日期在D2,剩余天数在E2,则请在E2输入公式:;=IF(ISERR(DATEDIF(TODAY(),D2+180,"D")),"已过期",DATEDIF(TODAY(),D2+181,"D"));即可。