View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs daddylonglegs is offline
external usenet poster
 
Posts: 287
Default Totaling DATEDIF SUMS

Hello kathi,

using =B1-A1 and formatting as yy " years, " mm " months, " dd " days" won't
give you the correct result, e.g. if B1-A1 =40 days that will (incorrectly)
give a result of 2 months and 9 days.

I'd stick with DATEDIF, then for a sum, assuming you have dates in rows 1 to
10, try

=DATEDIF(0,SUM(B1:B10)-SUM(A1:A10),"y")&" years,
"&DATEDIF(0,SUM(B1:B10)-SUM(A1:A10),"ym")&" months,
"&DATEDIF(0,SUM(B1:B10)-SUM(A1:A10),"md") & " days"



"kathi" wrote:

I have two (A&B) columns with dates in each
I them have (C) with the formula =DATEDIF(A6,B6,"y") & " years, " &
DATEDIF(A6,B6,"ym") & " months, " & DATEDIF(A6,B6,"md") & " days"
I need to total column (C)
OR
I have also revised it so that (C) is =B1-A1 resulting in a number string
and then formatting the cell to read yy " years, " mm " months, " dd " days"
but I still can't get a total of all these years...............