Sum Time-Off Hours Across Excel Worksheets
Question details
Calculate year-to-date time-off hours for each employee and code across 28 pay-period worksheets.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Each worksheet represents a two-week pay period, and the user wants totals on a separate YTD worksheet.
- Observed behavior
- The desired result is a YTD total of hours for each employee and time-off code across all pay periods.
Check your Excel version, sheet names, employee identifiers, time-off codes, and whether you need to sum hours or count records. Confirm that hours are numeric and that each pay-period sheet uses the same column layout.
Add SUMIFS results from each pay-period worksheet
Use this approach when all pay-period sheets have consistent columns and contain numeric hours.
The example assumes employee IDs are in column A, time-off codes are in column B, and hours are in column C on every pay-period sheet. On YTD, employee IDs start in A2 and code headings start in B1.
On the YTD worksheet, enter employee IDs down column A and time-off codes across row 1.
In YTD!B2, enter =SUM(SUMIFS('Period 01'!$C$2:$C$1000,'Period 01'!$A$2:$A$1000,$A2,'Period 01'!$B$2:$B$1000,B$1),SUMIFS('Period 02'!$C$2:$C$1000,'Period 02'!$A$2:$A$1000,$A2,'Period 02'!$B$2:$B$1000,B$1)). Replace the example sheet names and ranges with those in your workbook.
Edit the formula in the formula bar and add another SUMIFS term inside SUM for each remaining pay-period sheet, including all 28 sheets. Extend the row ranges if any sheet has data below row 1000.
Drag the fill handle from B2 across the code columns and down the employee rows. Compare a few results with the corresponding hours on the pay-period sheets.

Consolidate pay-period records into one table
Use a single data table when maintaining 28 separate SUMIFS terms would be cumbersome.
Sum time-off hours across sheets in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use SUMIFS to total employee hours by time-off code on a YTD worksheet.
- 1. Open the workbook: In WPS Spreadsheets, select Open and choose your Excel workbook.
- 2. Prepare the YTD sheet: On the YTD worksheet, enter employee IDs in column A and time-off codes across row 1.
- 3. Enter the formula: In YTD!B2, enter SUMIFS terms for each pay-period sheet inside SUM, using the employee ID in $A2 and the code in B$1 as criteria. Adjust the sheet names and ranges to match your workbook.
- 4. Fill and check: Drag the fill handle across and down, then compare several totals with the source sheets.
- 5. Save the workbook: Select File > Save As and choose XLSX if you want to keep the workbook in Excel format.

Frequently Asked Questions
Can SUMIFS use a 3D reference for all 28 sheets?
SUMIFS does not directly accept a 3D sheet range as its criteria or sum ranges. Add a SUMIFS term for each sheet, consolidate the records, or use a 3D SUM on matching precomputed total cells.
How do I count time-off entries instead of summing hours?
Use COUNTIFS with the employee ID and code ranges on each sheet, then add the results with SUM. COUNTIFS counts matching rows rather than adding the hours column.
Why is a YTD total zero when matching entries exist?
Check that the employee ID and code in YTD match the source values, including spaces and text-versus-number formats. Also check that the hours are numeric and that the formula ranges include the relevant rows.
How can I display totals over 24 hours?
If the source values are Excel time values, select the total cells and use Format Cells > Custom with the format [h]:mm. Decimal-hour totals can use a regular number format instead.




