Calculating hours from 2 times

jfro

Board Regular
Joined
Jun 7, 2004
Messages
155
Hey all,

How can I input 2 hours, in 2 cells and have a cell sum the total hours between them? Below is an example:

Start: End: Hours:
1:00 PM 5:00 PM the sum cell

Thanks!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
simply subtract them and apply a format of [h]:mm.

If you need this number to perform calculations (ie you mutliply hours by x cost), perform the operation and then multipy by 24 and format as general

Beware that without including the date, the operation will fail if your time range passes midnight. You can buy yourself 1 free pass of midnight by using
=B1+(B1 < A1)-A1
or
=(B1+(B1 < A1)-A1)*24
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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