Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculate Months to Determine Length of Service

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.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Calculate Months to Determine Length of Service

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
--
Gary''s Student - gsnu200845


"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.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
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.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 492
Default Calculate Months to Determine Length of Service

or

=(YEAR(NOW())-YEAR(A1))*12-MONTH(A1)+MONTH(NOW())

"Gary''s Student" wrote in message
...
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
--
Gary''s Student - gsnu200845


"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.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Calculate Months to Determine Length of Service

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...

"Alan" wrote:

or

=(YEAR(NOW())-YEAR(A1))*12-MONTH(A1)+MONTH(NOW())

"Gary''s Student" wrote in message
...
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
--
Gary''s Student - gsnu200845


"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.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Calculate Months to Determine Length of Service

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

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...
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.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculate Months to Determine Length of Service



"Rick Rothstein" wrote:

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 - 4 Months

1/1/2008 - 5/31/2008 - 5 Months

1/31/2008 - 5/1/2008 - 4 Month

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...
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.




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calculate Months to Determine Length of Service

Try this:

A1 = start date

=DATEDIF(A1,NOW(),"m")

--
Biff
Microsoft Excel MVP


"WilliamsDeLisle" wrote in
message ...
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.




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Calculate Months to Determine Length of Service

I don't understand why the middle range is 5 months whereas the last range
is 4 months. Given the 5 month answer (using half months for rounding I
think), I would have expected the last one to be 3 months... can you explain
how you are rounding?

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...


"Rick Rothstein" wrote:

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 - 4 Months

1/1/2008 - 5/31/2008 - 5 Months

1/31/2008 - 5/1/2008 - 4 Month

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...
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.





  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculate Months to Determine Length of Service

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

"Rick Rothstein" wrote:

I don't understand why the middle range is 5 months whereas the last range
is 4 months. Given the 5 month answer (using half months for rounding I
think), I would have expected the last one to be 3 months... can you explain
how you are rounding?

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...


"Rick Rothstein" wrote:

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 - 4 Months

1/1/2008 - 5/31/2008 - 5 Months

1/31/2008 - 5/1/2008 - 4 Month

--
Rick (MVP - Excel)


"WilliamsDeLisle" wrote in
message ...
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.








  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calculate Months to Determine Length of Service

=datedif(a1,today(),"m") will give you the number of completed months.
--
David Biddulph

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.



  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calculate Months to Determine Length of Service

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


"T. Valko" wrote:

Try this:

A1 = start date

=DATEDIF(A1,NOW(),"m")

--
Biff
Microsoft Excel MVP


"WilliamsDeLisle" wrote in
message ...
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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Average Length of Service EasyPeasy Excel Worksheet Functions 3 May 17th 23 07:44 PM
Function to calculate the Length of Service of an Employee Grd Excel Worksheet Functions 8 November 16th 09 09:22 AM
Employee Length of Service Kim Excel Worksheet Functions 5 December 22nd 08 02:39 PM
Length of service calculated in calender months. Dave Excel Discussion (Misc queries) 2 February 23rd 07 07:42 AM
Length of Service Dom Excel Worksheet Functions 7 July 17th 06 10:47 PM


All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"