Each row in columns A & B represents a shift worked during the first week of the year.
Column A identifies an employee, and column B lists the number of hours that employee worked on that shift.
Each employee may work any number of shifts per week, and they may be of variable length.
Columns C & D contain similar information for the second week of the year, and so on.
For any given employee and week number (cells A12:B14), we want to be able to calculate the number of overtime shifts (i.e. over 8 hours) that were worked.
Use the SUMPRODUCT and OFFSET functions as shown in the following formula:
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.