ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculating Time Spans (https://www.excelbanter.com/excel-discussion-misc-queries/262237-calculating-time-spans.html)

LabITGeek

Calculating Time Spans
 
I'm trying to figure out how to calculate the duration between the
"date/time" in to the "date/time" out. I have four cells DATE IN, TIME IN,
DATE OUT, TIME OUT. I have to somehow merge DATE IN/TIME IN and DATE
OUT/TIME OUT and then subtract the difference. But I can't seem to figure
how to merge the two cells and to obtain a realistic duration.

Jacob Skaria

Calculating Time Spans
 
A1 = Date in
B1 = Time in
C1 = Date out
D1 = Time out

Try the formula;
=C1+D1-(A1+B1)

and format the formula cell as below... FormatCEllsCustomType as below

[h]:mm



--
Jacob (MVP - Excel)


"LabITGeek" wrote:

I'm trying to figure out how to calculate the duration between the
"date/time" in to the "date/time" out. I have four cells DATE IN, TIME IN,
DATE OUT, TIME OUT. I have to somehow merge DATE IN/TIME IN and DATE
OUT/TIME OUT and then subtract the difference. But I can't seem to figure
how to merge the two cells and to obtain a realistic duration.


Dave Peterson

Calculating Time Spans
 
If A2 is the date-in, B2 is the time-in and c2 is the date-out and D2 is the
time-out:

=(c2+d2) - (a2+b2)


Ps. I'd put the date and time into the same cell. You can format it nicely to
show both the date and time. I think it makes the arithmetic easier.





LabITGeek wrote:

I'm trying to figure out how to calculate the duration between the
"date/time" in to the "date/time" out. I have four cells DATE IN, TIME IN,
DATE OUT, TIME OUT. I have to somehow merge DATE IN/TIME IN and DATE
OUT/TIME OUT and then subtract the difference. But I can't seem to figure
how to merge the two cells and to obtain a realistic duration.


--

Dave Peterson


All times are GMT +1. The time now is 12:34 PM.

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