|
|
The Excel NOW Function
Basic DescriptionThe Excel Now function returns the current date and time. The function has no arguments and therefore, the syntax of the function is:
NOW()
The NOW function updates every time your Excel worksheet is refreshed, and so any cells containing the function will be continually changing. Now Function ExamplesThe following example shows use of the NOW function, combined with the If function, to highlight when an appointment is due. The function format is shown in the upper spreadsheet and the results, at 2 different times, are shown in the two spreadsheets below.
In the above example, the current time (returned by the NOW function) is subtracted from the appointment time and the result is compared against 1 hour (=1/24 - see the page on Excel Dates & Times for an explanation of this). If the current time is less than 1 hour from the appointment time, the alert is shown; otherwise no text is shown in cell B2. The contents of cell B2 have also been formatted to have red bold text, to make the alert stand out more. Note that:
Further information on the Excel Now function can be found on the Microsoft Office website. |
||||||||||||||||||||||||||||||||
|
|
Copyright © 2008-2011 ExcelFunctions.net |