ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   YEAR MONTH DAYS COUNTER (https://www.excelbanter.com/excel-discussion-misc-queries/233760-year-month-days-counter.html)

ad2ad79

YEAR MONTH DAYS COUNTER
 
Hi,
I have a sheet in which I want to count the year then month and then
days for employee. i.e

Name Date of joining Date of leaving ABSENT DAYS TOTAL
JOHN 23-08-2001 11-11-2008 15
Years-Months-Days


I want that Function or formula count first Rounded Year from
23-08-2001 23-08-2008 then count Month and then days. and then minus
Absent days and final result. Pls help me.

muddan madhu

YEAR MONTH DAYS COUNTER
 
try this assumed date of joining in cell B2 , date of leaving in cell
C2 and Absent days in D2

=INT((C2-B2)/365)&" Years ,"&INT(MOD((C2-B2)/365,1)*12)&" Months ,"&INT
((((C2-B2)/365)*12)*31)-INT(MOD((C2-B2)/365,1)*12)*31-D2&" Days"


On Jun 13, 2:23*pm, ad2ad79 wrote:
Hi,
I have a sheet in which I want to count the year then month and then
days for employee. i.e

Name * *Date of joining * *Date of leaving * ABSENT DAYS *TOTAL
JOHN * * * 23-08-2001 * * * 11-11-2008 * * * * * 15
Years-Months-Days

I want that Function or formula count first Rounded Year from
23-08-2001 23-08-2008 then count Month and then days. and then minus
Absent days and final result. Pls help me.



ad2ad79

YEAR MONTH DAYS COUNTER
 
On Jun 13, 3:08*pm, muddan madhu wrote:
try this assumed date of joining in cell B2 , date of leaving in cell
C2 and Absent days in D2

=INT((C2-B2)/365)&" Years ,"&INT(MOD((C2-B2)/365,1)*12)&" Months ,"&INT
((((C2-B2)/365)*12)*31)-INT(MOD((C2-B2)/365,1)*12)*31-D2&" Days"

On Jun 13, 2:23*pm, ad2ad79 wrote:



Hi,
I have a sheet in which I want to count the year then month and then
days for employee. i.e


Name * *Date of joining * *Date of leaving * ABSENT DAYS *TOTAL
JOHN * * * 23-08-2001 * * * 11-11-2008 * * * * * 15
Years-Months-Days


I want that Function or formula count first Rounded Year from
23-08-2001 23-08-2008 then count Month and then days. and then minus
Absent days and final result. Pls help me.- Hide quoted text -


- Show quoted text -


NO.... It doesn't work... just try at ur end.... it doesn't show the
right result.... pls do send me the correct one
thanks

ad2ad79

YEAR MONTH DAYS COUNTER
 
On Jun 13, 3:08*pm, muddan madhu wrote:
try this assumed date of joining in cell B2 , date of leaving in cell
C2 and Absent days in D2

=INT((C2-B2)/365)&" Years ,"&INT(MOD((C2-B2)/365,1)*12)&" Months ,"&INT
((((C2-B2)/365)*12)*31)-INT(MOD((C2-B2)/365,1)*12)*31-D2&" Days"

On Jun 13, 2:23*pm, ad2ad79 wrote:



Hi,
I have a sheet in which I want to count the year then month and then
days for employee. i.e


Name * *Date of joining * *Date of leaving * ABSENT DAYS *TOTAL
JOHN * * * 23-08-2001 * * * 11-11-2008 * * * * * 15
Years-Months-Days


I want that Function or formula count first Rounded Year from
23-08-2001 23-08-2008 then count Month and then days. and then minus
Absent days and final result. Pls help me.- Hide quoted text -


- Show quoted text -


Hi Madan ..

If u calculate urself manually.. U c... Year and month calculate
correctly.. but..... days r not calculating correctly..

barry houdini[_6_]

YEAR MONTH DAYS COUNTER
 

What result do you expect for that example?

Try using DATEDIF, i.e. this formula

=DATEDIF(B2,C2-D2,"y")&" years "&DATEDIF(B2,C2-D2,"ym")&" months
"&DATEDIF(B2,C2-D2,"md")&" days"

for your example that will give "7 years 2 months 4 days"


--
barry houdini
------------------------------------------------------------------------
barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=106334



All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com