How to automatically update the Excel file editing time

When inserting and editing time Excel file, you will control the latest time to edit the file if shared with many people.

If working in a team when processing Excel documents, the content of the file will be edited many times, with different times. To control and manage the contents of an Excel file or to know when the other person last edited the file, you can insert the automatic update time into Excel. Then information about the time of creating, editing the latest Excel file is recorded and displayed right in the Excel file, helping you to know the last date the content was changed. The following article will guide you how to update the last time you edited an Excel file.

Instructions for updating the Excel file editing time

Step 1:

First of all we open the Excel file we want to add the edited time to the content. Press the key combination Alt + F11 to open the VBA code editor.

At Microsoft Visual Basic for Applications interface, click Insert and then select Module as shown below.

How to automatically update the Excel file editing time Picture 1

Step 2:

Then you enter the following code into the interface.

 Sub Workbook_Open() Range("A21").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date") Range("B21").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date") End Sub 

Note A1 and B1 are the position of the two cells where the creation time and the last time Excel file was modified. This position can vary depending on where the user sets the time in the Excel data table.

Once you have entered the code, click the Run icon to run.

How to automatically update the Excel file editing time Picture 2

Finally, at the position of the 2 cells you selected will display the time of the Excel file created and the time to edit the Excel file. Time display can completely change the format if desired.

How to automatically update the Excel file editing time Picture 3

See more:

  1. Instructions on how to insert current date in Excel
  2. How to format dates in Excel
  3. How to insert the current time into Google Sheets

I wish you successful implementation!

4 ★ | 5 Vote | 👨 967 Views
« PREV POST
NEXT POST »