Calculate Anniversary

PHnew

New Member
Joined
Oct 28, 2010
Messages
22
I have a cell that contains 1-1-2011. (CalculationData!$A$12)

I have a list of employees where there is a column that lists their hire date. (in the example below L2)

I have a column where I need to show where they are currently at with respect to their anniversary date for the current year. In this column, I have the following formula. It seems to work for more tenured people, but not so much for people with less than 1 year or just having passed the 1 year mark.

=IF(D2="Active",DATEDIF(L2,CalculationData!$A$12,"y"),"none")

Example: One person's hire date was 1-25-10. The result in her anniversary column is 0; where it should be 1.

Solutions are appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Maybe just ...

=IF(D2="Active", year(CalculationData!$A$12) - year(L2), "none")

 
Upvote 0
DATEDIF only counts whole years so 1-25-10 to 1-1-2011 is just over 11 months so the result in years is zero. If it should be 1 then at what point do you consider 1 year to have been reached, are you rounding to the nearest year?
 
Upvote 0
I read the question as "what anniversary will the employee have this year?"
 
Upvote 0
shg: That appears to solve my issue.

You are correct. That is the question I am asking: What anniversary will employee have this year?

Would you be so kind as to help me understand the differences between the formula I had and your and how they work?

If I remember correctly, I got my original answer from this board.

But isn't life always about tweaking things to find the right answer?

I appreciate all the help.
 
Upvote 0
Irrespective of the date you are hired, your first anniversary is in the following year, so there's no need to consider anything but the year.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,242
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top