View Single Post
  #3  
Old April 9th, 2009, 09:13 PM posted to microsoft.public.excel.worksheet.functions
Sean Timmons
external usenet poster
 
Posts: 1,722
Default Calculate Months to Determine Length of Service

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(A 1),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)))

"WilliamsDeLisle" wrote:

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.