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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

IML

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,743
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
 

Forum statistics

Threads
1,148,525
Messages
5,747,206
Members
424,068
Latest member
Salim khamis

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