Calculate overtime/lost time from a range of cells.

xblft1

New Member
Joined
Sep 11, 2018
Messages
9
Hi all,

I have a table of how many hours each employee worked in each day of the month.
I am trying to calculate their overtime and any time loss without having to create new tables.

Sumifs was my 1st thought however it adds cell values where what i want is to add the cell value minus 8:00:00 when this is not negative.

Example of what the data looks like:

Employee 1: 8:32:08, 8:35:13, 7:53:00

The result here should be 1:07:21 (overtime from the 1st two days, no discount for the 3rd day as the loss is to be calculated separately).

My data is a large number of staff for a whole month (and possibly will be a periodic task) so I'm looking for formulas to get those figures for each employee easily.

Any help would be greatly appreciated.
 

Excel 2010
ABCDEFG
20Day 1Day 2Day 3Day 4
21Employee 18:32:088:35:137:53:000:00:0000:07:00
22Employee 28:11:148:22:178:01:130:00:0000:00:00
23Employee 37:32:220:00:008:08:118:11:2200:27:38
24
6a
Cell Formulas
RangeFormula
G21=SUMPRODUCT(--(B21:E21<$A$1),--(B21:E21>0),($A$1-B21:E21))
G22=SUMPRODUCT(--(B22:E22<$A$1),--(B22:E22>0),($A$1-B22:E22))
G23=SUMPRODUCT(--(B23:E23<$A$1),--(B23:E23>0),($A$1-B23:E23))
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

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