How to Insert Last Saved Date in Excel (With Example)

Often you may want to display the date that an Excel file was last saved.

The easiest way to do this is by writing some code in VBA in Excel.

This might seem intimidating if you’re not familiar with VBA but the process is straightforward and the following step-by-step example shows exactly how to do so.

Step 1: Show the Developer Tab in Excel

First, we need to make sure the Developer tab is visible on the top ribbon in Excel.

To do so, click the File tab, then click Options, then click Customize Ribbon.

Under the section called Main Tabs, check the box next to Developer, then click OK:

Step 2: Create a Macro Using VBA

Next, click the Developer tab along the top ribbon and then click the Visual Basic icon:

Next, click the Insert tab and then click Module from the dropdown menu:

Next, paste the following code into the module code editor:

Function LastSavedDate() As Date
  LastSavedDate = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
End Function

The following screenshot shows how to do so:

Next, close the VB Editor.

Step 3: Use the Macro to Display the Last Saved Date

Lastly, we can use the macro we created to display the last saved date for the workbook.

To do so, type the following formula into any cell you’d like:


We’ll type this formula into cell A1:

By default, the function returns a numeric value.

To instead display a date, click cell A1 and then click the Number Format dropdown menu from the Home tab, then click Short Date:

The value in cell A1 will now be displayed as a date:

Excel last saved date

We can see that this particular Excel workbook was last saved on 11/20/2023.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

How to Remove Date Format in Excel
How to Use VLOOKUP With Date Range in Excel
How to Extract Minutes from Datetime in Excel

Leave a Reply

Your email address will not be published. Required fields are marked *