Time Differences over a day

originalmedic

New Member
Joined
Apr 25, 2023
Messages
4
Office Version
  1. 365
Hi All,

I've tried to do some formulas to calculate time differences between two times. My problem comes when the times go over to the next day it doesn't calculate or says an incorrect time. Can someone advise? Attached image
Arrival.png


I am trying to find out the difference between 06:02pm and 10:36am the next day
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about
Fluff.xlsm
ABCDE
1
218:02:0010:36:0016:34:00
306:22:0012:33:0006:11:00
Master
Cell Formulas
RangeFormula
E2:E3E2=IF(B2>D2,1+D2-B2,D2-B2)
 
Upvote 1
Solution
Let's say that your data posted above is in cells A2:D2.
Then, as long as your dates are entered as valid dates and your time is entered as valid time, you could do:
Excel Formula:
=SUM(C2:D2)-SUM(A2:B2)
 
Upvote 1
add the date and time of each then subtract.
mr excel questions 27.xlsm
ABCDE
12023-03-2318:022023-03-2410:3616:34
originalmedic
Cell Formulas
RangeFormula
E1E1=(C1+D1)-(A1+B1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
add the date and time of each then subtract.
mr excel questions 27.xlsm
ABCDE
12023-03-2318:022023-03-2410:3616:34
originalmedic
Cell Formulas
RangeFormula
E1E1=(C1+D1)-(A1+B1)
I can't seem to get this to work, if the difference I am calculating is over 2 days. See below - if i am calculating between 24/3/23 11:00 to 26/03/23 14:00 my sum is showing 03:00 instead of 26:00
1682434554842.png

does anyone know a way around this or a different formula? i am using the one shown by Awoohaw
 
Upvote 0
you would need to format your time calculation as [hh]:ss
 
Upvote 0
That is 51 hours, not 26 ;)
Format the cell as [h]:mm:ss
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,944
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top