How to sum and format a range of hours, minutes, or seconds in Excel
- Hours = [h]:mm:ss
- Minutes = [m]:ss
- Seconds = [ss]
To correctly display hour totals greater than 24, and minute and second totals greater than 60, use the following methods.
Example for HoursTo format time sums that are greater than 24 hours, follow these steps:
- Create a new worksheet and type the following values. Make sure to use a colon (:) to separate the numbers.
A1: 12:35:58 A2: 12:24:30 A3: 11:18:23
- Type the following formula into cell A4. Excel automatically formats the result correctly if you are adding hours.
Example for Minutes and SecondsTo format minute or second sums that are greater than 60, follow these steps:
- Create a new worksheet and type the following values. Make sure to insert the leading zeros (00), and use a colon (:) to separate the numbers.
A1: 00:42:58 A2: 00:19:30 A3: 00:37:23
- Type the following formula in cell A4:
A4: =SUM(A1:A3)Excel displays 1:39:51 as the total. To display this total as minutes and seconds, or seconds only, follow these steps to create and apply the appropriate format:
- Right-click cell A4, and then click Format Cells.
- Click the Number tab.
- In the Category list, click Custom.
- In the Type box, edit the number format codes to create the format you want.
- For the minutes format, type [m]:ss
- For the seconds format, type [ss]
- Select the formatting that you want to apply, and then click OK.
After you apply the seconds format, Excel displays 5981 as the total.
How to Apply the Formats to Additional CellsAfter you create the custom minutes and seconds formats, follow these steps to apply them to any additional cells in the workbook:
- Right-click the cells that you want to display the newly created format, and then click Format Cells.
- In the dialog box, click the Number tab, and then click Custom.
- In the custom list of formats, click to select the appropriate format, and then click OK.
Article ID: 266691 - Last Review: 10/25/2012 02:46:00 - Revision: 9.0
- kbhowto KB266691