Use the subtraction operator (-) to find the difference between times, and the TEXT function to format the times.
Hours never exceed 24, minutes never exceed 60, and seconds never exceed 60.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- 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
- 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.
|
|
Note You can also apply the time and date number format without using the TEXT function to specify the format. However, if you use both a format applied with the TEXT function and number format, the TEXT function takes precedence.
Function details
For presenting the result in a total based on one time unit (120 minutes)
Use the INT function, or HOUR, MINUTE, and SECOND functions to do this task.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- 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
- 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.
|
|