ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculate month & year in between two dates (https://www.excelbanter.com/excel-worksheet-functions/171016-calculate-month-year-between-two-dates.html)

Montu

Calculate month & year in between two dates
 
I have to calculate gratuity of an employee. for that reasone I have to
calculate total month & year from the date of joining to leaving date of
employee. example -
A B C
1 Date of Joining Date of Leaving Total Month & Year
2 11/02/2003 28/11/2006
in C2 I have to use a formula to calculate month & year, if calculate month
is greater than 6 month then it round up 1 year else zero. Is there any
formula about my quary. Thanks in advance

Mike H

Calculate month & year in between two dates
 
Try this in c2. Ensure cell is formatted as general

=MROUND(DATEDIF(A2,B2,"m"),12)/12

Mike

"Montu" wrote:

I have to calculate gratuity of an employee. for that reasone I have to
calculate total month & year from the date of joining to leaving date of
employee. example -
A B C
1 Date of Joining Date of Leaving Total Month & Year
2 11/02/2003 28/11/2006
in C2 I have to use a formula to calculate month & year, if calculate month
is greater than 6 month then it round up 1 year else zero. Is there any
formula about my quary. Thanks in advance


Teethless mama

Calculate month & year in between two dates
 
=(DATEDIF(A2,B2,"ym")6)+DATEDIF(A2,B2,"y")


"Montu" wrote:

I have to calculate gratuity of an employee. for that reasone I have to
calculate total month & year from the date of joining to leaving date of
employee. example -
A B C
1 Date of Joining Date of Leaving Total Month & Year
2 11/02/2003 28/11/2006
in C2 I have to use a formula to calculate month & year, if calculate month
is greater than 6 month then it round up 1 year else zero. Is there any
formula about my quary. Thanks in advance



All times are GMT +1. The time now is 02:29 AM.

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