headermask image

Business Tools Blog

Calculate a Full Month in Microsoft Excel

Problem: I had to calculate how many PTO hours employees should be accruing.  If an employee’s  tenure was 0-35 months, the accrual was 15 days of PTO per year.  If an employee’s tenure was 36 to 59 months, the accrual was 20 days per year.  If an employee’s tenure was =>60 months, the accrual was 25 days per year.

Solution: Excel “DATEDIF” formula to the rescue.  This formula compares two dates and returns whole months, years, or days.

For an employee with a hire date of 6/12/2006, I calculated the number of months worked:

=DATEDIF(A2, NOW(),”M”)

  • A2= 6/12/2006
  • NOW() = today 7/29/08

the answer is 25 months

The same formula can be used to calculate Years, by using “Y”; or used to calculate days, by using “D”  (see rows 3 & 4 in the picture below)

Photobucket

This formula is also useful for contract administration.


If you liked my post, feel free to subscribe to my rss feeds

2 Comments so far (Add 1 more)

  1. Such a simplified explanation. This articles is useful

    1. Pankaj on May 13th, 2009 at 10:52 pm
  2. Thanks for the formula.

    2. CCNA Training_Karrox on April 16th, 2009 at 2:41 am

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*