ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula for elapsed time (https://www.excelbanter.com/excel-worksheet-functions/240680-formula-elapsed-time.html)

Hookette

Formula for elapsed time
 
I have two cells with dates and time in them and I need to figure out elapsed
time. When it's within the same month C2-B2 works fine, if it's months apart
my formula doesn't work.

I have:
C2 has: 7/10/09 10:40
B2 has: 3/25/08 13:02
so I need how many months, days, hour and mins elapsed.

I also have:
C2: 7/6/09 10:26
B2: 3/29/09 23:06
so I need how many months, days hour and mins elapsed. (when I do this I
get 4 months instead of 3 months and 7 days, 11 hours and 20 mins).
thanks

Jacob Skaria

Formula for elapsed time
 
Try

=DATEDIF(B2,C2,"m") & " months " & DATEDIF(B2,C2,"md") & " days " &
TEXT(C2-B2,"hh") & " hours " & LEFT(TEXT(C2-B2,"mm:ss"),2) & " minutes"

If this post helps click Yes
---------------
Jacob Skaria


"Hookette" wrote:

I have two cells with dates and time in them and I need to figure out elapsed
time. When it's within the same month C2-B2 works fine, if it's months apart
my formula doesn't work.

I have:
C2 has: 7/10/09 10:40
B2 has: 3/25/08 13:02
so I need how many months, days, hour and mins elapsed.

I also have:
C2: 7/6/09 10:26
B2: 3/29/09 23:06
so I need how many months, days hour and mins elapsed. (when I do this I
get 4 months instead of 3 months and 7 days, 11 hours and 20 mins).
thanks


Hookette

Formula for elapsed time
 
Thank you, thank you, thank you!!!!!!!!!!!!!!!!!!!!!!!!!!

"Jacob Skaria" wrote:

Try

=DATEDIF(B2,C2,"m") & " months " & DATEDIF(B2,C2,"md") & " days " &
TEXT(C2-B2,"hh") & " hours " & LEFT(TEXT(C2-B2,"mm:ss"),2) & " minutes"

If this post helps click Yes
---------------
Jacob Skaria


"Hookette" wrote:

I have two cells with dates and time in them and I need to figure out elapsed
time. When it's within the same month C2-B2 works fine, if it's months apart
my formula doesn't work.

I have:
C2 has: 7/10/09 10:40
B2 has: 3/25/08 13:02
so I need how many months, days, hour and mins elapsed.

I also have:
C2: 7/6/09 10:26
B2: 3/29/09 23:06
so I need how many months, days hour and mins elapsed. (when I do this I
get 4 months instead of 3 months and 7 days, 11 hours and 20 mins).
thanks


Hookette

Formula for elapsed time
 
Any way, once you get all the months, days, hours, etc., that you can get an
average of it all? Using the Avg function doesn't work.

Thanks.

"Jacob Skaria" wrote:

Try

=DATEDIF(B2,C2,"m") & " months " & DATEDIF(B2,C2,"md") & " days " &
TEXT(C2-B2,"hh") & " hours " & LEFT(TEXT(C2-B2,"mm:ss"),2) & " minutes"

If this post helps click Yes
---------------
Jacob Skaria


"Hookette" wrote:

I have two cells with dates and time in them and I need to figure out elapsed
time. When it's within the same month C2-B2 works fine, if it's months apart
my formula doesn't work.

I have:
C2 has: 7/10/09 10:40
B2 has: 3/25/08 13:02
so I need how many months, days, hour and mins elapsed.

I also have:
C2: 7/6/09 10:26
B2: 3/29/09 23:06
so I need how many months, days hour and mins elapsed. (when I do this I
get 4 months instead of 3 months and 7 days, 11 hours and 20 mins).
thanks



All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com