Forum Discussion
Viswa88
Mar 26, 2022Copper Contributor
Adding multiple date ranges.
I have multiple date ranges. (24/3/1988 to 23/5/1992, 15/3/1994 to 1/3/1995 , 14/11/1996 to 18/7/1998....) How to calculate the total time period in number of years, months and days in excel 4/12...
SergeiBaklan
Mar 26, 2022Diamond Contributor
I'm not sure such logic works in general. Summing months and days separately depends on time scale you use, are leap years and months with 28,29, 30 and 31 days are inside. If take time scale from the beginning of Excel calendar that could be
=LET(
total, SUMPRODUCT($C$1:$C$4-$A$1:$A$4),
DATEDIF(0,total, "y") & " years " &
DATEDIF(0,total, "ym") & " months " &
DATEDIF(0,total, "md") & " days")
but results very depends on from which start date you calculate total number of days difference in the periods.