How to Preserve Elapsed Time Formatting in Excel Pivot Tables
Question details
Users need to format and summarize cumulative durations (elapsed time) properly in a PivotTable so that it displays total hours correctly rather than a standard time of day.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Aggregating and displaying time durations, such as project hours or race times, within an Excel PivotTable.
- Observed behavior
- Cumulative time values like 2:45:30 display incorrectly as a time of day or reset after 24 hours, instead of showing the true total elapsed hours, minutes, and seconds.
Ensure your source data columns are formatted as proper time values before creating or refreshing the PivotTable. If your source time data is stored as text, the PivotTable will automatically default to counting the values instead of summing them.
Apply Cumulative Time Formatting and Set Field to Sum
Change the Value Field Settings to sum the data and apply a custom number format [h]:mm:ss to prevent hours from resetting after 24.
When dealing with time data, Excel PivotTables frequently default to 'Count' or treat the sum as a standard clock time. By explicitly setting the calculation to 'Sum' and using the bracketed hour format, you command the spreadsheet to calculate total elapsed duration.
Click anywhere inside your existing PivotTable to make the PivotTable Fields pane appear on the right side of your screen.
In the 'Values' area of the pane, click the drop-down arrow next to your time field and select 'Value Field Settings' from the menu.
Under the 'Summarize Values By' tab, choose 'Sum' from the list of calculation types to ensure the time durations are added together.
Click the 'Number Format' button at the bottom left of the dialog. In the Format Cells window, select 'Custom' under the Category list, type [h]:mm:ss in the Type field, and click OK on all dialogs to apply.

Easily Manage PivotTable Formatting in WPS Spreadsheet
WPS Spreadsheet offers a robust set of PivotTable features that allow you to seamlessly summarize, format, and analyze your time data with full support for custom time formulas like [h]:mm:ss.
- 1. Insert a PivotTable: Open your data file in WPS Spreadsheet, select your data range, navigate to the Insert tab, and click 'PivotTable'.
- 2. Configure the Values: Drag your time data into the Values section of the PivotTable field list.
- 3. Adjust Value Field Settings: Click the time field in the Values area and choose 'Value Field Settings'. Select 'Sum' to add the durations together.
- 4. Set the Custom Format: Click 'Number Format', navigate to 'Custom', and input [h]:mm:ss to accurately display total cumulative time.

Frequently Asked Questions
Why does my PivotTable show 00:00 instead of total hours?
This commonly happens when the Value Field is set to 'Count' instead of 'Sum'. Navigate to Value Field Settings and change the summarization method to Sum to fix this.
What does the [h]:mm:ss format mean in spreadsheet applications?
The square brackets around the 'h' tell the application to display cumulative elapsed hours rather than standard clock time. It prevents the hour count from resetting to zero after passing 24 hours.
Can I format elapsed time for minutes only?
Yes. If you want to track total cumulative minutes and seconds instead of hours, you can enter the custom number format [m]:ss in the Number Format settings.
Why is 'Sum' greyed out or returning zero in my PivotTable?
This usually indicates that the source data is formatted as text rather than numerical time values. Go back to your source data, convert the text strings to proper time formats, and refresh the PivotTable.




