
Originally Posted by
Freaky_zoid
Bob, we check the birthday this year, which can be either previos or next depending on today's date.
I tried the DATEDIF function and here's what I've got:
=IF(ISERR(DATEDIF(TODAY(),DATE(YEAR(TODAY()),MONTH(A1),DAY(A1)),"d")),IF(AND(DATEDIF(DATE(YEAR(TODAY()),MONTH(A1),DAY(A1)),TODAY(),"d")<=2,WEEKDAY(TODAY(),2)=1),"The last weekend",IF(AND(MONTH(A1)=1,MONTH(TODAY())=12),DATEDIF(TODAY(),DATE(YEAR(TODAY())+1,MONTH(A1),DAY(A1)),"d"),"Not soon enough")),IF(DATEDIF(TODAY(),DATE(YEAR(TODAY()),MONTH(A1),DAY(A1)),"d")<61, IF(TODAY()-DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))=0,"Happy birthday",DATEDIF(TODAY(),DATE(YEAR(TODAY()),MONTH(A1),DAY(A1)),"d")),"Not soon enough"))
Looks like working ok, but a bit too long and not easy to work with
Bookmarks