Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Add/Sum up months, years, dates

Hi,
I need to calculate work experience in years ,months, days. I did a formula
=DATEDIF(Q18;Q19;"y")&" years "&DATEDIF(Q18;Q19;"ym")&" months
"&DATEDIF(Q18;Q19;"md")& "days", where Q18 is 03.09.2007 and Q19 is
05.07.2008. I got a result 0 years 10 months and 2 days. I now want to add up
several such results in order to have total years , months and days, how can
i do it?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Add/Sum up months, years, dates

Try adding all the From dates and all the To dates and then use datedif against
that:

=datedif(sum(q18:t18);sum(q19:t19);"y") & ....

I'm not sure how big those sums have to be before =datedif() breaks, though.



Delya wrote:

Hi,
I need to calculate work experience in years ,months, days. I did a formula
=DATEDIF(Q18;Q19;"y")&" years "&DATEDIF(Q18;Q19;"ym")&" months
"&DATEDIF(Q18;Q19;"md")& "days", where Q18 is 03.09.2007 and Q19 is
05.07.2008. I got a result 0 years 10 months and 2 days. I now want to add up
several such results in order to have total years , months and days, how can
i do it?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Add/Sum up months, years, dates

Delya wrote:
Hi,
I need to calculate work experience in years ,months, days. I did a formula
=DATEDIF(Q18;Q19;"y")&" years "&DATEDIF(Q18;Q19;"ym")&" months
"&DATEDIF(Q18;Q19;"md")& "days", where Q18 is 03.09.2007 and Q19 is
05.07.2008. I got a result 0 years 10 months and 2 days. I now want to add up
several such results in order to have total years , months and days, how can
i do it?




Assuming your dates are across rows 18 and 19, try this array formula (commit
with CTRL+SHIFT+ENTER):

=DATEDIF(,SUM(Q18:V18-Q19:V19),"y")&" years "&
DATEDIF(,SUM(Q18:V18-Q19:V19),"ym")&" months "&
DATEDIF(,SUM(Q18:V18-Q19:V19),"md")& " days"



If the dates are arranged alternating down the column, say Q18:Q29, it gets a
little more complex (still an array formula):


=DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"y")&" years "&
DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"ym")&" months "&
DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"md")& " days"



If they are arranged some other way...
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Add/Sum up months, years, dates

My dates are accross rows, but the formula you both gave did not work.. Here
is the exact sample what i need
Column A Column B Column C
18.11.1992 13.09.1995 26.12.1996
20.09.1995 01.11.1996 22.05.1998
Using Dateif formula i got below correct results:
Results a
column A-2years 10 Months 2 days
Column B-1years 1 Months 19 days
Coumn C- 1years 4 Months 26 days and goes on

now I want to sum up the years that given below of each column.
(e.g.2 years 10 month 2 days+1 years 1months 19 days+...)Any ideas?

'Original Source:
http://www.thecodecage.com/forumz/wo...ars-dates.html

"Glenn" wrote:

Delya wrote:
Hi,
I need to calculate work experience in years ,months, days. I did a formula
=DATEDIF(Q18;Q19;"y")&" years "&DATEDIF(Q18;Q19;"ym")&" months
"&DATEDIF(Q18;Q19;"md")& "days", where Q18 is 03.09.2007 and Q19 is
05.07.2008. I got a result 0 years 10 months and 2 days. I now want to add up
several such results in order to have total years , months and days, how can
i do it?




Assuming your dates are across rows 18 and 19, try this array formula (commit
with CTRL+SHIFT+ENTER):

=DATEDIF(,SUM(Q18:V18-Q19:V19),"y")&" years "&
DATEDIF(,SUM(Q18:V18-Q19:V19),"ym")&" months "&
DATEDIF(,SUM(Q18:V18-Q19:V19),"md")& " days"



If the dates are arranged alternating down the column, say Q18:Q29, it gets a
little more complex (still an array formula):


=DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"y")&" years "&
DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"ym")&" months "&
DATEDIF(,SUM((Q18:Q29*((-MOD(ROW(Q18:Q29),2))+1))-
(Q18:Q29*MOD(ROW(Q18:Q29),2))),"md")& " days"



If they are arranged some other way...
.

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 Years and Months Between Dates Tassy Anne Excel Discussion (Misc queries) 2 February 6th 09 03:43 PM
Summarizing Dates into Months and Years Yuanhang Excel Discussion (Misc queries) 8 February 19th 08 11:13 PM
Dates - Months & Years Rick Excel Worksheet Functions 5 November 23rd 05 04:11 PM
how do i sort dates by months and not years? A Homeschool Mom New Users to Excel 2 September 22nd 05 10:03 PM
How do I display months and years between two dates JSmith Excel Discussion (Misc queries) 1 November 30th 04 04:41 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"