假设顾客的生日在A1,要在B1显示提示。我们规定,里顾客生日还有1星期的时候就提示差几天,没有到7天的就不提示。
那么在B1录入:
=IF(AND(TODAY()-DATE(YEAR(NOW()),MONTH(A1),DAY(A1))>=-7,TODAY()-DATE(YEAR(NOW()),MONTH(A1),DAY(A1))<0),"还差"&-TODAY()+DATE(YEAR(NOW()),MONTH(A1),DAY(A1))&"天过生日","")
即可得到你要的结果
哦,在你的表格F3填公式:
=IF(AND(TODAY()-DATE(YEAR(NOW()),MONTH(E3),DAY(E3))>=-7,TODAY()-DATE(YEAR(NOW()),MONTH(E3),DAY(E3))<0),"还差"&-TODAY()+DATE(YEAR(NOW()),MONTH(E3),DAY(E3))&"天过生日","")
就好了
真有心啊,另外提醒你,如果你电脑上的日期不准的话这个提示也会不准的哟,呵!