Function Problems

Excel: Convert and Sum Text Durations with Leading Zeros

Camila MilosovichCamila Milosovich Nov 12, 2026 870 views

Question details

Convert pasted text durations with an unwanted leading zero into usable time values and calculate the correct total.

Excel: Convert and Sum Text Durations with Leading Zeros
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.
Before you start

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.

Solution 1

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.

1
Enter the cleanup formula

In an empty cell next to the source value in A1, enter =RIGHT(A1,LEN(A1)-1), then press Enter.

2
Fill the formula down

Select the formula cell and drag its fill handle down, or copy and paste the formula beside the remaining duration values.

Check the cleaned value: Confirm that the result displays the intended hh:mm:ss text before converting or summing it.

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. 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. 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. 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.
Convert pasted text durations with familiar spreadsheet formulasDisplay cumulative totals with the custom [h]:mm:ss formatUse a lightweight spreadsheet editor with a familiar Excel-style interfaceOpen and save Microsoft Excel .xlsx files with format compatibility
microsoft office alternative - wps office

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.