ExcelFlux

Sum working hours by team and month

Use SUMIFS to total net hours for a selected team in a given month. In the example, the Warehouse team worked 15 hours and 30 minutes in November 2026.

Worked example

E2TeamWarehouse
E3A date in the reporting month11/12/2026
E4Monthly net working hours15.50 hours

Copyable formulas

English Excel · en-US
=IF(OR($E$2="",COUNT($E$3)=0),"",SUMIFS($C$2:$C$6,$B$2:$B$6,$E$2,$A$2:$A$6,">="&DATE(YEAR($E$3),MONTH($E$3),1),$A$2:$A$6,"<"&DATE(YEAR($E$3),MONTH($E$3)+1,1)))
Turkish Excel · tr-TR
=EĞER(VEYA($E$2="";BAĞ_DEĞ_SAY($E$3)=0);"";ÇOKETOPLA($C$2:$C$6;$B$2:$B$6;$E$2;$A$2:$A$6;">="&TARİH(YIL($E$3);AY($E$3);1);$A$2:$A$6;"<"&TARİH(YIL($E$3);AY($E$3)+1;1)))

Enter the sample records

Put the headers in A1:C1 and the records below in A2:C6. Enter the timestamps as Excel date and time values, and net hours as decimal numbers. 7.50 hours is 7 hours and 30 minutes.

A · Record date and time B · Team C · Net hours
10/31/2026 23:00 Warehouse 3.00
11/01/2026 00:00 Warehouse 7.50
11/15/2026 08:00 Sales 5.00
11/30/2026 22:00 Warehouse 8.00
12/01/2026 00:00 Warehouse 2.00

Enter Warehouse in E2 and enter 11/12/2026 as a date in E3. Paste the formula into E4 and format the cell as a Number with two decimal places.

How the month boundary works

The formula uses the date in E3 to find the first day of that month and the first day of the next month. For November, it includes records at or after November 1 at 00:00 and before December 1 at 00:00. That includes the late shift on November 30. The record at midnight on December 1 belongs to December. The same rule works from December to January.

Check the result

  • Warehouse, November 2026 gives 7.50 + 8.00 = 15.50 hours.
  • Sales, November 2026 gives 5.00 hours.
  • Warehouse, December 2026 gives 2.00 hours.
  • The result stays blank until a team and an Excel date value are entered. With no matching records, the total is zero.

This example totals each row by its record date. To allocate one shift across two months, follow the month-end example in the overnight shift guide and enter a separate row for each month’s share.

For the syntax and a second example, see the SUMIFS function reference.

Microsoft Excel reference