Add created date and last modified time in a cell in Excel

If you want to add the last save time and/or creation date in Excel cells follow this steps (via VBA scripts):

date

1. Hold ALT + F11 keys, that will open the Microsoft Visual Basic for Applications window:

2. Click Insert > Module, and paste the following macro in the Module Window:

Sub Workbook_Open()
Range(“A1”).Value = Format(ThisWorkbook.BuiltinDocumentProperties(“Creation Date”), “short date”)
Range(“B1”).Value = Format(ThisWorkbook.BuiltinDocumentProperties(“Last Save Time”), “short date”)
End Sub

3. Press F5 key to run the macro.

Then it inserts the created date in Cell A1, and inserts the last modified date in Cell B1.
(you can modify the cells by simply editing the script and replacing A1,B1 with the desired cells)

Enjoy !

One thought on “Add created date and last modified time in a cell in Excel

  1. Ariel

    Is there any way to have this work on a per sheet basis? So if I have worksheet A, worksheet B, and worksheet C, and I only change worksheet C, then it inserts the last saved date into a cell that worksheet. While the other two retain their last modified date, until I change something there. Basically a last revision date on each worksheet…

Comments are closed.