|
|
The Excel HOUR Function
Basic DescriptionThe Excel HOUR function returns an integer representing the hour component of a supplied Excel time. The syntax of the Datevalue function is :
HOUR( serial_number )
where the serial_number argument is the time from which you want to extract the hour component. This can be supplied to the function either directly (as a text representation of a time or as a decimal value), as a reference to a cell containing a time, or as a time value returned from another function or formula. Note that, if the serial_number argument contains a date and time, the Hour function ignores the date part of the argument. Hour Function ExamplesThe following spreadsheet shows the Excel Hour function applied to several different supplied times. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results.
Note that, in the above spreadsheet, the time shown in cell A4 is actually a whole day plus the time 05:11:22. Therefore, when supplied with this value, the Hour function ignores the full day and simply returns the hour value 5. Similarly, the date part of the value in cell A5 is ignored, and the hour function simply returns the hour value 8. Further information and examples of the Excel Hour function can be found on the Microsoft Office website. Hour Function ErrorIf you get an error from the Excel Hour Function, this is likely to be the #VALUE! error : Common Error
|
|||||||
|
|
Copyright © 2008-2011 ExcelFunctions.net |