no. of months worked between two dates, etc...

M

missB

hi all,
below is my data sample:

A B C D E F
Emp # Hire Dt Rehired Term Dt CA Start CA End
1 8/1/2008 9/15/2009 4/3/2009 12/1/2005 12/7/2009 = 2 mos.
2 8/13/1984 12/9/2002 8/15/2002 12/1/2005 12/7/2009 = 48 mos.
3 8/6/2007 8/6/2007 12/1/2005 12/7/2009 = 28 mos.
4 9/10/2007 9/10/2007 12/1/2005 12/7/2009 = 26 mos.
5 4/28/2000 8/16/2005 8/3/2006 12/1/2005 12/7/2009 = 48 mos.

i have already figured out the no. of months worked w/n the CA dates using
this formula:
=IF(C2<E2,DATEDIF(E2,F2,"m"),IF(D2<C2,DATEDIF(C2,F2,"m"),DATEDIF(C2,D2,"m")))

but the problem pertains to Emp. #1, where they were Hired & Rehired w/n the
CA date so the correct answer should actually be 2 + 8 mos. (8/1/2008 -
4/3/2009). how do i insert this into my formula? if it is not possible, i
just need a separate one to answer "Hired & Rehired CA dates (Y/N)" then i'll
do it manually.

second question, i need a formula to answer this query: Worked in 2006
(Y/N), Worked in 2007 (Y/N), Worked in 2008 (Y/N), Worked in 2009 (Y/N). The
ultimate goal is to get a count of how many employees worked in those given
year.

help. thanks in advance!
 

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

Top