Can Excel automatically insert current date in a cell?

  • Thread starter Thread starter Guest
  • Start date Start date
In answer to the last sentence you would need to have a macro enabled
workbook with this macro in "ThisWorkbook"

Sub Workbook_Open()
Worksheets("sheet1").Range("a1") = Now()
End Sub

This will automatically enter the date when a workbook is opened

from information at http://www.ozgrid.com/VBA/auto-run-macros.htm

Regards
Steve
 
Does anyone know of a function that can make Excel automatically insert the current date into a cell when a file is opened up?

ANSWER:

There is a very simple way to do this that doesn't require Macros enabled or VB script. Use the IF function with the date or date & time formula embedded.

=IF(B1=0,"",TODAY()) this will include static date
=IF(B1=0,"",NOW()) this will include static date & time

I use this and it works flawlessly.

good luck.
 
Back
Top