Excel: Convert and Sum Text Durations with Leading Zeros
Question details
Convert pasted text durations with an unwanted leading zero into usable time values and calculate the correct total.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Pasted duration values contain a leading zero and need to be converted before they can be summed accurately.
- Observed behavior
- Excel treats the pasted durations as text or returns an incorrect total when the values are summed directly.
Check one source cell to confirm that the first character is the unwanted leading zero and that the remaining value follows an hh:mm:ss pattern. Select the destination cells and make sure the result column can use a custom number format.
Remove the leading zero from a duration value
Use this formula when each pasted duration has one extra zero at the beginning and you want Excel to recognize the remaining time text.
In an empty cell next to the source value in A1, enter =RIGHT(A1,LEN(A1)-1), then press Enter.
Select the formula cell and drag its fill handle down, or copy and paste the formula beside the remaining duration values.
Convert text durations and sum the total
Use this formula when a range contains pasted text durations and the total may exceed 24 hours.
Convert and Sum Text Durations in WPS Spreadsheets
WPS Spreadsheets supports the same cleanup, conversion, SUM, and custom-duration formatting workflow. Use it to turn pasted text durations into usable times and preserve totals beyond 24 hours.
- 1. Clean the duration text: In WPS Spreadsheets, select an empty cell and enter =RIGHT(A1,LEN(A1)-1) to remove the unwanted first character from the value in A1.
- 2. Convert and total the range: In the total cell, enter =SUM(IF(A1:A10<>"",TIMEVALUE(MID(A1:A10,2,8)))) and press Enter. For older versions, use Ctrl+Shift+Enter when required.
- 3. Format cumulative hours: Select the total, open the Home tab's number-format controls or Format Cells, choose Custom, and apply [h]:mm:ss.

Frequently Asked Questions
Why does Excel not sum my pasted duration values correctly?
Pasted values may be stored as text rather than time values. Remove the unwanted leading character, convert the remaining text with TIMEVALUE, and then sum the converted results.
What formula removes the first character from a duration in A1?
Enter =RIGHT(A1,LEN(A1)-1) in another cell. The formula returns every character except the first one.
Why should I use [h]:mm:ss instead of hh:mm:ss?
The [h]:mm:ss format displays cumulative hours and does not reset the hour display after 24 hours. The hh:mm:ss format shows a clock time and can hide the number of completed days.
Do older Excel versions require a special way to enter the SUM formula?
Yes. If the version does not support dynamic arrays, select the formula cell and confirm =SUM(IF(A1:A10<>"",TIMEVALUE(MID(A1:A10,2,8)))) with Ctrl+Shift+Enter.




