Get and insert the created time and last modified time in cells
This article will talk about ways to get the created time and last modified time of current workbook information, and insert the created time and last modified time of current workbook information in cells in Excel.
Get the created time and last modified time in Excel with Info command
Insert the created time and last modified time in cells/header/footer with Kutools for Excel
Get the created time and last modified time in Excel with Advanced Properties function
Insert the created time and last modified time in cells in Excel with VBA code
Get the created time and last modified time in Excel with Info command
We can find out the exact created time and last modified time of current workbook in backstage view of Microsoft Excel 2010 / 2013.
Click the File > Info, and in the right side of backstage view it displays the Related Dates information. Under the Related Dates title, it lists the last modified time, created time, and last printed time. See following screenshot:
Note: This way is only available in Microsoft Excel 2010/2013. It is invalid in Excel 2007.
Insert the created time and last modified time in cells/header/footer with Kutools for Excel
May I introduce you a handy tool--Kutools for Excel which including more than 300 useful functions can enhance your working efficiency? With its Insert Workbook Information function, you can quickly insert workbook path, workbook/worksheet name, user name or created time and last modified time into cells or header or footer.
After free installing Kutools for Excel, please do as below:
1. Click Kutools Plus > Workbook > Insert Workbook Information. See screenshot:
2. Then in the Insert Workbook Information dialog, check the information you want to insert from Information section, then go to specify the location you want to insert to, you can choose cells, footer (left footer, centre footer, right footer) or header (left header, centre header, right header). See screenshot:
3. Click Ok, and the information you check has been inserted to the location you specify.
Get the created time and last modified time in Excel with Advanced Properties function
Actually, we can get the both created time and last modified time of current workbook in Document Properties dialog box.
Step 1: Open the Advanced Properties dialog box:
In Excel 2007, click the Office button > Prepare > Properties, and a Document Properties bar will be displayed below the toolbar, click Document Properties > Advanced Properties, see screenshots:
In Excel 2010/2013, click the File > Info > Properties > Advanced Properties.
Step 2: In the Advanced Properties dialog box, you will see the created time and last modified time under Statistics tab. See the following screenshot:
Insert the created time and last modified time in cells in Excel with VBA code
The following VBA macros will help you insert the created time and last modified time of current workbook information in cells directly.
Insert both created time and last modified time in Excel
Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert >> Module, and paste the following macro in the Module Window.
VBA code: Insert both created time and last modified time in Excel
Sub Workbook_Open()
Range("A1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date")
Range("A2").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date")
End Sub
Step 3:Press the F5 key to run this macro. And then the created date and last modified date will be inserted into cell A1 and cell A2 separately.
Note: you can modify the destination cell in the VB according to your needs.
Insert last modified time of workbook in Excel
Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert >> Module, and paste the following macro in the Module Window.
Public Function ModDate()
ModDate = Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm")
End Function
Step 3: Then save and close this code, and go back to the worksheet, in a blank cell, enter the formula of =ModDate(), and press the Enter key. Then it inserts the last modified time in the cell.
Insert created time of workbook in Excel
Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert >> Module, and paste the following macro in the Module Window.
Function CreateDate() As Date
CreateDate = ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
End Function
Step 3: Save and close this code, return to the worksheet,in a blank cell, enter the formula of =CreateDate(), and press the Enter key.and the created date will be inserted into the cell as following screenshots shown:
Note: If your cell is not date format, it may display a strange number. Just format this cell as Date format, it will show as a normal date.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!