» Counting the Number of Shifts in a Specified Week that an Employee Worked Overtime
CATEGORY - Excel Date & Time Formulas
VERSION - All Microsoft Excel Versions
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.
Solution:
Use the SUMPRODUCT and OFFSET functions as shown in the following formula:
=SUMPRODUCT((OFFSET($A$3:$A$9,0,2*(B12-1))=A12)*(OFFSET
($B$3:$B$9,0,2*(B12-1))>8))
Book Store:
Recommended Books:
- Windows XP All-in-One Desk Reference For Dummies
- Accounting for Dummies
- The Intelligent Investor: The Classic Bestseller on Value Investing
- Financial Statement Analysis: A Practitioner's Guide, 3rd Edition
- The McGraw-Hill Guide to Writing a High-Impact Business Plan: A Proven Blueprint for First-Time Entrepreneurs
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
No comments have been submitted.

