How to Auto-populate the Date in Excel

by Jaime AvelarUpdated September 28, 2017
Stockbyte/Stockbyte/Getty Images

Having the user enter a date in your Microsoft Office Excel application can be time-consuming and frustrating if the user uses the workbook often. In Excel, you can add a formula to a particular cell where you need to display a date. Visual Basic for Applications can also be used to automate populating the date in Excel. The “NOW()” function is used to populate the date in Excel using either method.

Launch Microsoft Office Excel and click “A1” on your spreadsheet. Press “F2” and type the following to auto-populate the system date:

\= NOW()

Click the “Developer” tab and click “Visual Basic” to open the Visual Basic Editor. Click the “Insert” menu and click “Module” to add a new module.

Copy and paste the following code to populate the date in “B2” using VBA:

Private Sub autoPopulateDate()

End Sub

Press “F5” to run the procedure.


Photo Credits

  • Stockbyte/Stockbyte/Getty Images

About the Author

Jaime Avelar is a professional writer whose programming articles appear on various websites. He has been a software programmer since 2000. Avelar holds a Master of Science in information systems from the University of Texas at Arlington.

More Articles