Formula Hours???

jan96ken

New Member
Joined
Nov 17, 2009
Messages
4
Can someone tell me how to set up a formula to find the difference in hours.

For instance 10:00pm - 2:00 am is 4 hours. I can't figure out a formula that will do this for me.

Your help is MUCH appreciated!

Jan
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi Jan & Welcome to the Board,

How about this...and custom format cell as [h]:mm

Excel Workbook
FG
910:00 PM4:00
102:00 AM*
Time
 
Upvote 0
If you have a start time in A2 and end time in B2 then you can use either of these formulas to get the hours difference, whether the shift crosses midnight or not

=B2-A2+(A2>B2)

or

=MOD(B2-A2,1)

Either way, format result cell as time
 
Upvote 0
Thanks so much for taking the time to respond to my question. I was able to use your suggestions and finish my spreadsheet! :)
 
Upvote 0

Forum statistics

Threads
1,215,359
Messages
6,124,488
Members
449,166
Latest member
hokjock

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