Note: The other languages of the website are Google-translated. Back to English

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

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

Insert the created time and last modified time in cells/header/footer with Kutools for Excel good idea3


arrow blue right bubble 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:

-2

 

Note: This way is only available in Microsoft Excel 2010/2013. It is invalid in Excel 2007.


arrow blue right bubbleGet 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:

doc-insert-modified-time-3-3
-1
doc-insert-modified-time-4-4

 

In Excel 2010/2013, click the File > Info > Properties > Advanced Properties.

doc-insert-modified-time-4-4

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:

doc-insert-modified-time-4-4


arrow blue right bubble 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.

-2

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:

-2

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.


arrow blue right bubble 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.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

1. Click Kutools Plus > Workbook > Insert Workbook Information. See screenshot:
doc last modify name2

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:
doc insert created modified time 1

3. Click Ok, and the information you check has been inserted to the location you specify.

Tip. If you want to have a free trial of the Insert Workbook Information function, please go to free download Kutools for Excel first, and then go to apply the operation according above steps.

arrow blue right bubble Insert Workbook Information



The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom