Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think the calculation of the number of Years, Months and Days is not as
straight forward as one of the posts has implied. If someone joins on 12/1/05 then =Month(Now())-Month("12/1/05") will give -1 Similarly negative numbers will be calculated in the day part of the calculation. I would suggest splitting up the calculation into three steps If A2 has the join date then put formula for Year in B2. This will be =IF(AND(YEAR(NOW())YEAR(A2),MONTH(NOW())MONTH(A2 ),DAY(NOW()DAY(A2))),DATEDIF($A$2,NOW(),"y"),0) Put formula for calculating Months in C2. This will be =DATEDIF(DATE(YEAR(A2)+B2,MONTH(A2),DAY(A2)),NOW() ,"m") Put formula for calculating Days in D2 as follows =DATEDIF(DATE(YEAR(A2)+B2,MONTH(A2)+C2,DAY(A2)),NO W(),"d") There is probably a simpler approach. I would definately like to hear about it. "Christyepd" wrote: I am setting up the employees lenths of service from the date hired until present date. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE | Excel Discussion (Misc queries) | |||
Dates - Months & Years | Excel Worksheet Functions | |||
Formula that will represent years & months worked | Excel Discussion (Misc queries) | |||
how to calculate years, months by using one formula | Charts and Charting in Excel | |||
How do I display months and years between two dates | Excel Discussion (Misc queries) |