Calculating the difference between start and finish times in hours and minutes

Katie152

New Member
Joined
Nov 6, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm trying to create a rota which automatically calculates an employee's hours worked per day.
I would like to know how to calculate the difference between a1 (start time) and b1 (finish time) into c1 (hours worked)

Thank you
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
would this be in the same day - No start one day and finish the next day - Just time

If in time format
B1-A1

You can format [H]:MM to remove any leading zeros

Book2
ABC
112:0016:004:00
Sheet1
Cell Formulas
RangeFormula
C1C1=B1-A1
 
Upvote 0
Hi Etaf,
Thank you,Yes this is for start and finish times on the same day However, when the finish time is not a whole hour the value returned isn't quite right.
For example, 14:15 the value returned is 4.15, ideally i'd like it display 4.25
14:30 the value returned is 4.3, ideally i'd like it display 4.5
14:45 the value returned is 4.45, ideally i'd like it display 4.75

Is there any way to do this?
 
Upvote 0
format the dates to your preference
- rounded up
- OK if hours span midnight

Date and Time 2021.xlsm
BCDE
2$ 100.00
310:0014:154.25425.00
410:0014:334.75475.00
522:0002:505.00500.00
2d
Cell Formulas
RangeFormula
D3:D5D3=CEILING((C3-B3+(B3>C3))*24,0.25)
E3:E5E3=$E$2*D3
 
Upvote 0
Thank you all for your help, I have now managed to get the correct values. Methods from both Alz and Dave Patton worked great
 
  • Like
Reactions: alz
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,822
Members
449,096
Latest member
Erald

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