difference between two times

dashing_peep08

Board Regular
Joined
Jul 3, 2007
Messages
75
hi i have these two times that i need to subtract from each other.

login logout...
4:58PM 5:15PM
5:15PM 5:50PM
5:50PM 7:48PM
7:48PM 8:18PM
8:18PM 10:17PM
11:12PM 2:00AM
3:18AM 3:19AM

how do i get the difference between each time. logout-login.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

dashing_peep08

Board Regular
Joined
Jul 3, 2007
Messages
75
=TEXT(B2-A2,"h:mm:ss") this formula works but when the times are already changing like 11:22pm and 12:15am it already gives me a value error. but with pm to pm or am to am it works fine..
 
Upvote 0

cblincoln43

Board Regular
Joined
Mar 12, 2002
Messages
206
try =b1-a1+(b1 < a1), will take you past the midnight hour without a date. Thanks Aladin for this formula, it has saved me manny times..
 
Upvote 0

Forum statistics

Threads
1,191,307
Messages
5,985,898
Members
439,986
Latest member
DaveTee

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
Top