Formula to show hours and minutes between times

jim101

Board Regular
Joined
Mar 22, 2005
Messages
110
I need a formula to tell me how many hours and minutes are between 10:00 pm to 8:00 am

if in cell B2 I have 10/18/11 8:17 AM and in cell C2 I have 10/19/11 10:51 AM the formula should show 10 hours

if in cell B2 I have 10/18/11 5:00 PM and in cell C2 I have 10/19/11 4:45 AM the formula should show 6 hours and 45 minutes

Can this be done using excel 2003? Thanks
 
If you need the formula to work for instances where both times are on the same day then try this version

=L2-K2-(INT(L2)-INT(K2))*(K1-L1)-MEDIAN(MOD(L2,1),K1,L1)+MEDIAN(MOD(K2,1),K1,L1)
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,225,062
Messages
6,182,634
Members
453,129
Latest member
mike4slund

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