设日期值在A1,B1中输入公式=IF(DATEDIF(A1,TODAY(),"D")=0,"已到期",IF(DATEDIF(A1,TODAY(),"D")<=30,"还差"&DATEDIF(A1,TODAY(),"D")&"天到期",""))选中B1单元格----格式----条件格式------条件一------改"单元格数值"为"公式"------输入公式----------=DATEDIF(A1,TODAY(),"D")<=30 格式中设定字体颜色和图案单元格底纹
条件格式