Calculate Months to Determine Length of Service

  • Thread starter WilliamsDeLisle
  • Start date
W

WilliamsDeLisle

I need to be able to input a beginning employment date, i.e., 10/12/1994 and
calculate the number of months between this date and the current date to
determine the amount of vacation earned per month to be used in an IF formula.

EXAMPLE: Start Date 06/13/85 current date 04/9/09 = How Many Months
IF Statement would be If 0-60 months 8 Hours accrued each month, if 61-120
months 10 hours accrued each month, If 121-180 months 12 hours accrued each
month.
 
G

Gary''s Student

if A1 contains:
6/13/1985
and B1 contains:
4/9/2009

Then:
=(YEAR(B1)-YEAR(A1))*12+MONTH(B1)-MONTH(A1)
displays 286 as the number of months
 
S

Sean Timmons

k.. here's the most accurate I can get...

Assuming the start date is in cell A1.

This formula will come back as FALSE if the employee is over 15 years. To
fix that, put, sa: ,12,14 instead of just ,12 at the end.......

=IF((DATE(YEAR(A1),MONTH(A1),DAY(A1)))<(DATE(YEAR(TODAY()-5),MONTH(TODAY()),DAY(TODAY()))),8,IF((DATE(YEAR(A1),MONTH(A1),DAY(A1)))<(DATE(YEAR(TODAY()-10),MONTH(TODAY()),DAY(TODAY()))),10,IF((DATE(YEAR(A1),MONTH(A1),DAY(A1)))<(DATE(YEAR(TODAY()-15),MONTH(TODAY()),DAY(TODAY()))),12)))
 
S

Sean Timmons

Careful though... If the day of month of today is less than day of month of
hire date, it's really 5 months and, say, 20 days, not 6 months. Depends on
the level of accuracy the OP needs, of course...
 
R

Rick Rothstein

How do you count your months? For example, how many months do you think are
between these date ranges?

1/1/2008 - 5/1/2008

1/1/2008 - 5/31/2008

1/31/2008 - 5/1/2008
 
W

WilliamsDeLisle

I made a mistake - sorry - You are correct the first two are 5 months the
last on is 3 months.
 
W

WilliamsDeLisle

This information is great for calculating the length of service now I need
help with the second part of my question which is:

IF Statement would be If 0-60 months 8 Hours accrued each month, if
61-120 months 10 hours accrued each month, If 121-180 months 12 hours
accrued each month, if more than 181 months then 14 hours accrued each
month. When I try to put in an argument I get an error message.

**This accrual amount for each month must be used in the monthly column if
the worksheet for that month has 100% for the hours worked in cell C02 of
each month.

i.e.,:

Column A Column B
(Month) (Earned)**
JULY-08 ________ (see the description above)
AUG-08
SEPT-08
OCT-08
NOV-08
 

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