View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
dpb dpb is offline
external usenet poster
 
Posts: 109
Default Anniversary dates

On 2/23/2019 3:06 PM, wrote:
I've been trying to use a formula that will auto-populate the next anniversary date for an employee.

....

Try

=IF(DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))=TODAY() ,
DATE(YEAR(TODAY()),MONTH(A1),DAY(A1)),
DATE(YEAR(TODAY())+1,MONTH(A1),DAY(A1)))

Logic as in previous comment, it takes me some time to wrap my head
around Excel function syntax and delve out which is the one that has the
right form as being text/date/number/etc., ...

For the employee anniversary date in A1.

Could recast the IF() into a computed 0|1 addend to the year if desired;
this is the "deadahead" implementation of the thought process of how to
determine.


=DATE(YEAR(TODAY())+N(DATE(YEAR(TODAY()),MONTH(A1) ,DAY(A1))=TODAY()),MONTH(A1),DAY(A1)))

is off-the-cuff recast...untested. Particularly check for matching
parentheses.

--