# Addition of time between hours to Countif

#### Drexl88

##### Board Regular
Hi,

I have the below formula in cell R8 which calculates the total hours worked based on abbreviations of the type of shift and the standard hours the specified shifts cover. The problem I now have is that where shifts are split between employees to cover sickness there is a need to indicate the actual times each employee is working that day (see k8). Is it possible to add onto the formula below to count additional hours worked (D8:Q8) if the hours in those cells that require it were in time format i.e. 09:00 - 13:00.

Any help would be much appreciated.

=SUM(COUNTIF(D8:Q8, {"D","N","DC","B/D"}))*12.25+COUNTIF(D8:Q8,"TWL")*12

Last edited by a moderator:

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Replies
0
Views
215
Replies
8
Views
96
Replies
0
Views
48
Replies
4
Views
222
Replies
0
Views
439

1,129,372
Messages
5,635,880
Members
416,886
Latest member
coreyalaurence37

### 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.

### Which adblocker are you using?

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

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