MS Excel: NOW Function (WS, VBA)
Learn how to use the Excel NOW function with syntax and examples.
The Microsoft Excel NOW function returns the current system date and time. The NOW function will refresh the date/time value whenever the worksheet recalculates.
The syntax for the Microsoft Excel NOW function is:
Parameters or Arguments
There are no parameters or arguments for the NOW function.
The NOW function can be used in the following versions of Microsoft Excel:
- Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Excel Function
The NOW function can be used in Microsoft Excel as the following type of function:
- Worksheet function (WS)
- VBA function (VBA)
Example (as Worksheet Function)
Let's look at some Excel NOW function examples and explore how to use the NOW function as a worksheet function in Microsoft Excel:
The spreadsheet will continue to display this value, until the worksheet recalculates. By pressing the F9 key, you can force the worksheet to recalculate and the NOW function will update its value.
Example (as VBA Function)
The NOW function can also be used in VBA code in Microsoft Excel.
Let's look at some Excel NOW function examples and explore how to use the NOW function in Excel VBA code:
Dim LValue As Date LValue = Now
In this example, the variable called LValue would now contain the current system date and time.