Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Last Saved Date on worksheet

Tags:

Does anyone know how to display the Last Saved Date of an Excel Spreadsheet on one of the worksheets?

I have found ways to do it using macros, but the spreadsheet is populated by an add-in called Jet Essentials, and this does not like macros so a solution here must not use one.

like image 442
Richard.Gale Avatar asked Oct 21 '14 14:10

Richard.Gale


People also ask

How do I show the last saved date in an Excel worksheet?

To find the last saved date of an Excel file, in the Ribbon, go to File > Info. In the Info window, on the right side, you can find the Last Modified (in this example 6/5/2015). This is the date and time when the file was last saved.

Can you add a last updated date in Excel?

Question: In Microsoft Excel, how can I autoupdate a date on an Excel worksheet to the Last Modified Date? Answer: There is no built-in function in Excel that will return the last modified date of an Excel Workbook (ie: Excel file). However, you can create a Macro function that will return this value.

How do I insert a last timestamp in Excel?

Insert Date and Timestamp Using NOW FunctionRight-click on the cell and select 'Format cells'. In the Format Cells dialog box, select 'Custom' category in the Number tab. In the Type field, enter dd-mm-yyyy hh:mm:ss. Click OK.

How can I tell when an Excel cell was last updated?

To locate the last cell that contains data or formatting, click anywhere in the worksheet, and then press CTRL+END.

How do I display the last saved time in a worksheet?

Function LastSavedTimeStamp() As Date LastSavedTimeStamp = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time") End Function Save the module, close the editor and return to the worksheet. Click in the Cell where the date is to be displayed and enter the following formula:

How to insert last saved date in Excel VBA?

You have to follow the following steps. Firstly, press ALT+F11 or you have to go to the tab Developer, select Visual Basic to open Visual Basic Editor, and click Insert. Select Module. Sub Last_Saved_Dates_1 () Range ("C4").Value = Format (ThisWorkbook.BuiltinDocumentProperties ("Last Save Time"), "short date") End Sub

How do I get the last saved value from a workbook?

One approach: If you're familiar with VBA you can add this code to a Module in the workbook to create a user-defined function: Format a cell with Date formatting of your choice & enter the function as =LastSaved () . No arguments are required between the parens. It will update each time the workbook is opened.

How do I format last saved time stamp in Excel?

Need to format the cell where you put the “=LastSavedTimeStamp ()” command. If so, right-click on that cell and select “Format Cells…”; click the “Number” tab and select “Date”; then under “Type” select how you want it formatted. Click “OK.” Above directions were written using Excel 2010.


2 Answers

thought I would update on this.

Found out that adding to the VB Module behind the spreadsheet does not actually register as a Macro.

So here is the solution:

  1. Press ALT + F11
  2. Click Insert > Module
  3. Paste the following into the window:

Code

Function LastSavedTimeStamp() As Date
  LastSavedTimeStamp = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
End Function
  1. Save the module, close the editor and return to the worksheet.
  2. Click in the Cell where the date is to be displayed and enter the following formula:

Code

=LastSavedTimeStamp()
like image 52
Richard.Gale Avatar answered Oct 23 '22 16:10

Richard.Gale


This might be an alternative solution. Paste the following code into the new module:

Public Function ModDate()
ModDate = 
Format(FileDateTime(ThisWorkbook.FullName), "m/d/yy h:n ampm") 
End Function

Before saving your module, make sure to save your Excel file as Excel Macro-Enabled Workbook.

Paste the following code into the cell where you want to display the last modification time:

=ModDate()

I'd also like to recommend an alternative to Excel allowing you to add creation and last modification time easily. Feel free to check on RowShare and this article I wrote: https://www.rowshare.com/blog/en/2018/01/10/Displaying-Last-Modification-Time-in-Excel

like image 38
Astaeka Avatar answered Oct 23 '22 16:10

Astaeka