Thursday 10 July 2014

Excel TIME Function

Microsoft Excel TIME Function

Basic Description

The Excel Time function accepts three integer arguments representing hours, minutes and seconds, and returns an Excel time.
The syntax of the function is:
TIME( hour, minute, second )
where the hour, minute and second arguments are integer values that can be supplied to the function either directly, as values returned from other formulas, or as references to cells containing integers.
If any of the Time function arguments are supplied as decimals, these are truncated to integers. Note also that, if the hour value is greater than 23, this value is divided by 24 and the remainder is used as the hour (for example, if you supply the function with the value 25 as the hour argument, the value 1 is used).
Like all Excel times, the time returned from the Excel Time function is stored, within Excel, as a decimal (see the page on Excel Dates & Times for further information on this). Therefore, if you want the result of the function to be displayed as a time, you will need to make sure that the cell containing the function is formatted with an Excel 'Time' format.

Time Function Examples

The following spreadsheet shows several examples of the Time function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right:
 Formulas:
ABCDE
1HrsMinsSecsTime
2=TIME( 5, 44, 32 )
3=TIME( 2+3, 44, 32 )
452155=TIME( A4, B4, C4 )
50073=TIME( A5, B5, C5 )
 Results:
ABCDE
1HrsMinsSecsTime
205:44:32
305:44:32
45215505:21:55
5007300:01:13
The results in column E of the above spreadsheet, are formatted with the Time format hh:mm:ss.
Also note that, in cell E5 of the example above, the Excel Time function successfully converts the supplied value, 73 seconds, into the time 1 minute and 13 seconds.

No comments:

Post a Comment