Function Problems

How to Calculate Weekly Employee Hours Across Multiple Excel Columns

Kushani NimanthikaKushani Nimanthika Nov 11, 2026 868 views

Question details

The user needs a method to total all weekly hours assigned to specific employees when their names and corresponding hours are distributed across multiple columns in a two-dimensional schedule.

How to Calculate Weekly Employee Hours Across Multiple Excel Columns
Product
Excel
Device & OS
not provided
Scenario
Calculating weekly schedule hours for payroll or time tracking when the schedule layout spans multiple days and columns.
Observed behavior
Using standard functions like SUMIF may fail because the criteria range spans multiple columns, which creates a mismatch in shape with the sum range. A formula capable of handling two-dimensional array conditions is required.
Before you start

Ensure that employee names are spelled exactly the same across all columns in your schedule, and verify that all assigned hours are entered as numeric values rather than text.

Solution 1Recommended

Use the SUMPRODUCT Function for Two-Dimensional Ranges

SUMPRODUCT is the most reliable method for searching a full schedule grid and summing corresponding hours because it naturally handles two-dimensional arrays.

When your employee names and their corresponding hours are listed across multiple columns (e.g., Monday to Friday columns), SUMIF cannot handle the mismatched array shapes. SUMPRODUCT multiplies the arrays conditionally to return the correct total.

1
Select the destination cell

Click on the cell where you want to display the employee's total weekly hours.

2
Enter the SUMPRODUCT formula

Type the formula =SUMPRODUCT((A2:E10="Employee Name")*(B2:F10)), replacing "Employee Name" with the actual name, A2:E10 with your schedule's name grid, and B2:F10 with the corresponding hours grid.

3
Calculate the result

Press Enter to calculate the sum. Ensure the name range and hours range are identically sized but properly offset to match your specific column layout.

Use the SUMPRODUCT Function for Two-Dimensional Ranges
Array Sizing Rule: Make sure that the dimensions of the name range and the hours range are exactly the same size (e.g., both are 9 rows by 5 columns), or the formula will return a #VALUE! error.
Powerful Spreadsheet Software

Easily Calculate Schedule Hours with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array functions like SUMPRODUCT, making it easy to calculate complex 2D schedule data without restructuring your tables.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your weekly schedule workbook.
  2. 2. Enter the SUMPRODUCT formula: Click on the total hours cell and input your SUMPRODUCT formula referencing the multiple name and hour columns.
  3. 3. Apply and calculate: Press Enter to get the result, and use the fill handle to drag the formula down to calculate hours for other employees dynamically.
100% compatible with Microsoft Excel formulas like SUMPRODUCT and SUMIFFree, lightweight, and fast to load large schedule filesFamiliar user interface requires no learning curveBuilt-in templates for employee timesheets and payroll tracking
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't SUMIF work for summing across multiple columns?

SUMIF requires the criteria range and sum range to be the exact same size and shape. If you select a two-dimensional criteria range (like multiple days) but a one-dimensional sum range, it cannot map the values correctly and will return incorrect results or an error.

How do I handle empty cells or text in the hours range when using SUMPRODUCT?

If your hours range contains text, the default SUMPRODUCT multiplication will cause a #VALUE! error. Ensure all cells in the sum range are either blank or contain numeric values. Alternatively, you can modify the formula using double negatives, such as =SUMPRODUCT(--(NameRange="John"), HoursRange), if your ranges align perfectly without an offset.

Can I calculate weekly hours for multiple employees at once?

Yes. Instead of typing the employee's name in quotes directly into the formula, reference a cell containing the employee's name (e.g., =SUMPRODUCT(($A$2:$E$10=H2)*($B$2:$F$10))). You can then drag the formula down a list of unique employee names to calculate all totals simultaneously.