using a year in a date



I have a list of employees and have calculated their retirement dates. this
among other things are calculated on sheet 1 (labeled senioritylist). On
sheet 2 I want to calculate the percentage of employees that have reached
their retirement date or are within 5 years of retirement, and then do the
same in the 5-10 year retirment group, etc. I was trying to use
=countif(senioritylist!k3:k58,"(today()+365.25*5)") but that does not work.
What am I doing wrong?

Gary''s Student

Actually you were very close:

=COUNTIF(senioritylist!K3:K58,"<=" & (TODAY()+365.25*5))

is a "reasonable" estimate.


If you want to check the dates falling before today + five years use
=COUNTIF(senioritylist!K3:K58,"<" & (TODAY()+365.25*5))

also > will give you dates falling AFTER 5 year

I prefer to use
to add 5 years

Niek Otten

In L3, put:

and copy down

In K60, put:


Ok, I took my stupid pills today. Using your formula, I tried to change the
5 year to 10 years and subtract out the 5 year retirees. It doesn't work. I
=COUNTIF(SENIORITYLIST!K3:K58,"<="&(TODAY()+365.25*10))-COUNTIF(senioritylist!K3:K58,"<=" & (TODAY()+365.25*5)) What do you think?


yeah, your original formula worked to figure out how many were within 5 years
of retirement, but when I try the expanded formula to try and find out how
many within 10 years of retirement and then subtract out the 5 years. I get
an error to the formula.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question