Stephan
Member
Hello
OBJECTIVE: Best method for simple, basic & concise way to calc:
DATE DIFFERENCE between 2 DATES displayed in:
YEAR - MONTH - DAY - HOUR - MIN
QUESTION: Surely there must be a better way of calculating DATE DIFFERENCES of:
2 DATE:TIME CELLS in XL 2021 and/or 365 to calc, other then using DATEDIF? Unless it a much abbreviated version, then old layout..
So far best suggestion is CONCATE DATEIF, which is @ btm of this post, all in 1 cell visible to, not all folded under in cascading lines...
Please see attached Spreadsheet & Screen-Shot for clarification, what I'm asking for, which in a Spreadsheet is far more obvious then Words in Black&White etc.
1. DATES SUBTRACTED, but is incorrect with current FORMULA & FORMAT CELLS, yes I did try BRACKETS on HOURS… [HH] but was not right…either..!
FORMAT CELLS CUSTOM:
yy "Yr" m "Mth" d "Day" hh:mm
See CELL E5 in RED for ERROR, & compare with correct DATE+TIME calc in F3.
2. DATEDIF I recognise exists & probably the long term solution, but it is very very REPETITIVE, re-quoting CELLS REFs again & again, and when strung concertina together in 1CELL, it is complicated to follow, hence fraught with likely human error when used elsewhere, appreciate you might say…this is the way to do it & want u want to get it all in 1 and to display in 1 cell string together, or add it together from separates is easy to edit. E.G:
A.
1 CELL: F13
Or
B.
SEPARATE CELLS:
YEAR: CELL E10
MTH: CELL F10
WK: CELL G10
DAY: CELL H10
HOUR:MIN: CELL I10
ADD TOGETHER: CELL F11
3. CONCATE DATEDIF
And appreciate my perspective if was way for SIMPLE/BASIC SUBRTRACT to calc correct that would be best.
If not, choice between the original DATEDIF separates, or tbh the suggested CONCATE DATEDIF is prob best…
But... surely in this day & age, there must be other ways? Or even a better way, or ways!
Realistically doubt any1 will better the CONCATE DATEIF though!
Cheers Stephan

CROSS THREADS?:
https://www.excelforum.com/excel-fo...certina-string-together-mess.html#post6042739
https://www.myonlinetraininghub.com...ve-instead-of-concertina-string-together-mess
OBJECTIVE: Best method for simple, basic & concise way to calc:
DATE DIFFERENCE between 2 DATES displayed in:
YEAR - MONTH - DAY - HOUR - MIN
QUESTION: Surely there must be a better way of calculating DATE DIFFERENCES of:
2 DATE:TIME CELLS in XL 2021 and/or 365 to calc, other then using DATEDIF? Unless it a much abbreviated version, then old layout..
So far best suggestion is CONCATE DATEIF, which is @ btm of this post, all in 1 cell visible to, not all folded under in cascading lines...
Please see attached Spreadsheet & Screen-Shot for clarification, what I'm asking for, which in a Spreadsheet is far more obvious then Words in Black&White etc.
1. DATES SUBTRACTED, but is incorrect with current FORMULA & FORMAT CELLS, yes I did try BRACKETS on HOURS… [HH] but was not right…either..!
=B1-A1
FORMAT CELLS CUSTOM:
yy "Yr" m "Mth" d "Day" hh:mm
See CELL E5 in RED for ERROR, & compare with correct DATE+TIME calc in F3.
2. DATEDIF I recognise exists & probably the long term solution, but it is very very REPETITIVE, re-quoting CELLS REFs again & again, and when strung concertina together in 1CELL, it is complicated to follow, hence fraught with likely human error when used elsewhere, appreciate you might say…this is the way to do it & want u want to get it all in 1 and to display in 1 cell string together, or add it together from separates is easy to edit. E.G:
A.
1 CELL: F13
=DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"y")&" Year "&DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"ym")&" Mth "&INT(DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"md")/7)&" Wk "&MOD(DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"md"),7)&" Day "&TEXT(B1-A1,"h"" Hr "" m"" Min "" s"" Sec""")
Or
B.
SEPARATE CELLS:
YEAR: CELL E10
=DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"y")&" Year "
MTH: CELL F10
=DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"ym")&" Mth "
WK: CELL G10
=INT(DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"md")/7)&" Wk "
DAY: CELL H10
=MOD(DATEDIF(A1,B1 -(MOD(A1,1)>MOD(B1,1)),"md"),7)&" Day "
HOUR:MIN: CELL I10
=TEXT(B1-A1,"h"" Hr "" m"" Min """)
ADD TOGETHER: CELL F11
=E10&F10&G10&H10&I10
3. CONCATE DATEDIF
=CONCAT(DATEDIF(A1,B1,{"y","ym","md"})&{" Year "," Mth "," Day "})&TEXT(B1-A1,"H""Hr"" M""M""")
And appreciate my perspective if was way for SIMPLE/BASIC SUBRTRACT to calc correct that would be best.
If not, choice between the original DATEDIF separates, or tbh the suggested CONCATE DATEDIF is prob best…
But... surely in this day & age, there must be other ways? Or even a better way, or ways!
Realistically doubt any1 will better the CONCATE DATEIF though!
Cheers Stephan

CROSS THREADS?:
https://www.excelforum.com/excel-fo...certina-string-together-mess.html#post6042739
https://www.myonlinetraininghub.com...ve-instead-of-concertina-string-together-mess