A weekly total that appears to reset after 24 hours is usually a time formatting issue, not a problem with the SUM formula. Excel stores time as decimal days, so a value of 1 equals 24 hours. The standard hh:mm format shows clock time and wraps back to zero after 24 hours. Use elapsed-time formatting instead.
The problem
This issue came up in the r/excel community discussion about fixing a 24-hour reset. It affects businesses that use an Excel working hours sheet to total employee shifts, weekly hours, overtime, or billable time.
The formula in the total cell is:
=SUM(J8,J13,J18,J23,J28)
This formula adds the five referenced cells. There is no obvious problem with it if those cells contain valid Excel time values.
The likely problem is the cell formatting. With hh:mm, Excel treats the result as a time of day. Once the total reaches 24 hours, the display starts again at zero. For example, 30 hours may appear as 06:00 because Excel displays only the time remaining after complete 24-hour periods.
The underlying value can still be correct. Excel represents time as a fraction of a day. A result of 1.25 means one day plus one-quarter of a day, which equals 30 hours. The display changes, but the stored calculation does not.
The solution
Change the total cell's custom format from hh:mm to [h]:mm.
The square brackets are the important part. They tell Excel to display elapsed hours instead of clock hours. A result of 30 hours will then appear as 30:00 rather than 06:00.
Microsoft's guidance uses [h]:mm for elapsed time that exceeds 24 hours. The h displays hours, the colon separates hours from minutes, and mm displays minutes. The brackets around h prevent the hours from wrapping after 24.
The formula can remain:
=SUM(J8,J13,J18,J23,J28)
SUM adds the values in the listed cells. The commas separate each cell reference. You could also use a range if the cells were next to each other, such as =SUM(J8:J28), but that would include every cell between J8 and J28. Keep the original formula if the gaps are intentional.
Use hh:mm when you want a time of day, such as 08:30 for a start time. Use [h]:mm when you want a duration, such as 37:45 for total weekly hours.
How to apply it
- Select the cell that shows the weekly total.
- Open Format Cells. In desktop Excel, right-click the cell and choose Format Cells, or press
Ctrl+1on Windows. - Select the Number tab.
- Choose Custom.
- In the Type box, enter
[h]:mmwithout the spaces. - Select OK.
- Confirm that the total now shows accumulated hours, such as 30:00 or 42:15.
- Check the formula bar to verify that the cell still contains
=SUM(J8,J13,J18,J23,J28). - Test the sheet with a known total. For example, add entries that equal 25 hours and confirm that the result displays 25:00, not 01:00.
- Apply the same format to any other cells that show weekly, monthly, overtime, or billable-hour totals.
If the workbook is used in Excel for the web, the calculation can still add more than 24 hours, but custom number-format options may be limited depending on the version and editing experience. When the web version does not allow the format to be applied, open the workbook in desktop Excel, set the cell to [h]:mm, save it, and then reopen it online.
Do not change the source shift cells to [h]:mm automatically. A shift beginning at 08:00 should normally remain a clock time. Apply elapsed-time formatting to calculated durations and totals.
If shifts cross midnight, the calculation needs separate attention. For a start time in A2 and an end time in B2, a basic duration formula is:
=B2-A2
This subtracts the start time from the end time. For an overnight shift where the end time is recorded as an earlier clock time, use:
=MOD(B2-A2,1)
MOD returns the remainder after division. Here, it converts a negative-looking overnight difference into the correct fraction of a day. Format the result as [h]:mm.
For payroll or compliance reporting, consider storing the date alongside each shift. A time-only sheet can become ambiguous when an employee works across midnight or when managers review several weeks together.
Implementation angle
For a small business, this fix is a useful first step toward a more reliable hours process. An automation partner could replace scattered references such as J8, J13, J18, J23, and J28 with a structured table containing employee, date, start time, end time, break, and approved hours. Make or n8n could then send approved totals to payroll, invoicing, or a weekly management report, while Zoho Creator could provide controlled data entry instead of an easily damaged spreadsheet.
Creator Scripts can build and check the Excel formulas, validate overnight shifts, and connect the approved hours workflow to the systems your business already uses. Book an AI implementation engagement with Creator Scripts at creatorscripts.com.
Frequently asked questions
Why does my total hours in Excel reset after 24 hours?
This happens because of the time formatting in Excel. If your total is formatted as hh:mm, it resets after reaching 24 hours, displaying only the time remaining instead of the total hours worked.
How do I change the time format to show hours over 24?
To display hours beyond 24, change the cell format to [h]:mm. This format allows Excel to show accumulated hours correctly without resetting after 24 hours.
Can I use the same formula for an overnight shift in Excel?
Yes, you can use a formula to calculate overnight shifts. Use =MOD(B2-A2,1) to handle the end time that occurs past midnight, then format the cell as [h]:mm to display the correct duration.