林向荣 发表于 2021-11-26 22:28:00

求筛选生日计算的公式,谢谢!


如左边,能不能选择任一月份,在“提示”栏中,以today为对照,显示三种类型内容:
今年生日已过
今天生日
今年生日还有*天
尝试改了好多次都没改成功。求高手启发一下,谢谢!!!!

蜡笔小丸子 发表于 2022-1-7 23:17:04

=IFERROR(IF(TEXT(I5,"MM-dd")-TEXT(TODAY(),"MM-dd")=0,"今天生日",IF(TEXT(I5,"MM-dd")-TEXT(TODAY(),"MM-dd")<0,"今年生日已过",IF(TEXT(I5,"MM-dd")-TEXT(TODAY(),"MM-dd")>0,"今年生日还有"&TEXT(I5,"MM-dd")-TEXT(TODAY(),"MM-dd")&"天"))),"")

颜大浹 发表于 2022-1-17 22:11:38

J5=IFERROR(IF(TODAY()-DATE(YEAR(TODAY()),MONTH(I5),DAY(I5))>0,"今年生日已过",IF(TODAY()-DATE(YEAR(TODAY()),MONTH(I5),DAY(I5))=0,"今天生日","今年生日还有"&-TODAY()+DATE(YEAR(TODAY()),MONTH(I5),DAY(I5))&"天")),"")

素心从简 发表于 2022-2-11 05:43:50

感谢两位,我进一步研究学习,谢谢!!!
页: [1]
查看完整版本: 求筛选生日计算的公式,谢谢!