Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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

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

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
calculate year and month michelle Excel Discussion (Misc queries) 9 May 23rd 08 08:54 AM
Calculate month & year in between two dates Montu Excel Worksheet Functions 0 December 29th 07 08:19 AM
Sorting dates by month instead of year MMangen Excel Worksheet Functions 5 December 19th 06 09:08 PM
sort dates by month and day not year dianne Excel Worksheet Functions 2 March 8th 05 08:16 PM
how to calculate total months from month/year patti Excel Discussion (Misc queries) 1 December 8th 04 09:50 PM


All times are GMT +1. The time now is 02:27 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"