在excel中,已知生产日期和有效期,如何得出到期日?答:A列是生产日期,B列是有效期(只能填入x年或x月,且不能有空格),C列是根据公式自动计算出的到期日,公式如下:=IF(RIGHT(B2,1)="年",DATE(YEAR(A2)+LEFT(B2,LEN(B2)*2-LENB(B2)),MONTH(A2),DAY(A2)-1),IF(RIGHT(B2,1)="月",DATE(YEAR(A2)+QUOTIENT(LEFT(B2,LEN(B2)*2-LENB...
Excel中填入生产日期和保质期,自动计算出到期日期答:在C2单元格输入下面的公式:=IF(RIGHT(B2,1)="年",EDATE(A2,-LOOKUP(1,-LEFT(B2,ROW($1:$90)))*12)-1,IF(RIGHT(B2,1)="月",EDATE(A2,-LOOKUP(1,-LEFT(B2,ROW($1:$90)))-1,IF(RIGHT(B2,1)="天",A2-LOOKUP(1,-LEFT(B2,ROW($1:$90)))-1,"")))按回车,并下拉公式...