The information in this article applies to:
SUMMARYIn Microsoft Excel, you can use formulas to calculate the elapsed time for a given period. If the elapsed time is under 24 hours, use direct subtraction. If the elapsed time exceeds 24 hours, use the formula provided in the example in the more information section of this article. MORE INFORMATION
Use the following formulas to calculate elapsed time for a given
interval.
Calculating Elapsed Time for a Period Under 24 HoursTo calculate elapsed time when you know the total will not exceed 24 hours, subtract the start time from the end time as in the following example:
When you format cell A3 using the time format "h:mm" (or "h:mm:ss") Microsoft Excel will display the hour and minutes (and seconds) of the elapsed time. In this case cell A3 would display "5:00", representing 5 hours difference between the two times. Calculating Elapsed Time for a Period that Exceeds 24 HoursIf your end time is more than 24 hours beyond your start time, you need to compute the elapsed hours separately from the elapsed minutes and seconds as in the following example:
Note: Format cells A3:A5 using the General number format not a time format. To display the elapsed time using standard time format ("hh:mm:ss"), concatenate (string together) the values in A3:A5 using the following formula:
This formula concatenates the hours, minutes, and seconds of elapsed time, separating each with a colon. The ampersand (&) serves as a text joining operator to tie the pieces together. Microsoft Excel interprets the result of this formula as text and, therefore, uses left alignment for the displayed value. To change the cell alignment to right alignment, choose Alignment from the Format menu and select the Right option under Horizontal in the Alignment dialog box. REFERENCES
"Microsoft Excel User's Guide 1," version 4.0, pages 108-110 Additional query words: 2.0 2.00 2.01 2.1 2.10 2.1c 2.10c 2.1d 2.10d 2.2 2.20 2.21 3.0
Keywords : |
Last Reviewed: March 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |