Total hours between two times in same cell

DanAnderton

New Member
Joined
Sep 22, 2017
Messages
16
Hi there,

I'm working on a staff register and would like to calculate the total hours worked, my problem is I want the start and end of the shift to be in the same cell, I'd also like to deduct break time (as we don't get paid for breaks). Here's an example of what I'm looking for:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Total Hours[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[/TR]
[TR]
[TD]Jon Doe[/TD]
[TD]15[/TD]
[TD]7am - 4pm
1.5 hour break[/TD]
[TD]7am - 4pm
1.5 hour break[/TD]
[/TR]
</tbody>[/TABLE]

Any ideas on how I can do this? I've seen a template out there that does exactly this, but I'd like to build on the concept to calculate total hours worked Mon - Sat differently to Sunday.

Any help would be greatly appreciated.
 

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.
you can fake the look by changing the cells grid lines to white and that will make the whole process much more stable and less prone to issues
 
Upvote 0
I tried that, but I'm trying to make the whole thing simple to input and read. Think I've found a solution though by calculating contracted and overtime hours on a different sheet as the contracted doesn't change.

One problem I'm running into now though is with an IF statement. I'd like to use a function within the statement, example:

=IF(F8="HOL",Hours:(F7),0)

But I keep getting the #value error. Any idea what I'm doing wrong?
 
Upvote 0
Don't think I explained that very well.

F8 refers to a cell below the shift where I put in HOL if the person is on holiday. F7 is the cell containing the shift
 
Upvote 0

Forum statistics

Threads
1,226,117
Messages
6,189,068
Members
453,524
Latest member
AshJames

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