For this method to work, hours can never exceed 24, minutes can ever exceed 60, and seconds can never exceed 60.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
How?
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
![Selecting an example from Help](../img/selecthelp.gif)
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
A |
Hours worked |
1:35 |
8:30 |
3:00 |
4:15 |
8:00 |
Formula |
Description (Result) |
=SUM(A2:A5) |
Total hours worked when the total is less than a day (17:20) |
=SUM(A2:A6)*24 |
Total hours worked when the total is greater than a day (25.33333). |
|
Notes
- To view the second formula as a number, select the cell and click Cells on the Format menu. Click the Number tab, and then click General in the Category box.
- If the time you are adding contain seconds, format the cell with time format that displays seconds. Select the cell and click Cells on the Format menu. Click the Number tab, and then click Time in the Category box.
Function details
SUM
Use the TIME function to manipulate a part of a time— such as the hour or minute— within a formula.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
How?
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
![Selecting an example from Help](../img/selecthelp.gif)
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
A |
B |
C |
Time |
Description |
Amount |
10:35:00 AM |
Hours |
2 |
10:35:00 AM |
Minutes |
10 |
10:35:00 AM |
Seconds |
30 |
Formula |
Description (Result) |
=A2+TIME(C2,0,0) |
Add 2 hours to the time above (12:35:00 PM) |
=A3+TIME(0,C3,0) |
Add 10 minutes to the time above (10:45:00 AM) |
=A4+TIME(0,0,C4) |
Add 30 seconds to the time above (10:35:30 AM) |
|
Functions details
TIME