Insert the date an Excel Workbook was last modified.

Anonymous
2010-11-17T00:13:29+00:00

Is there a way to insert, into a cell, the date that a workbook was last modified?

Perhaps by getting the modified date from the file's properties into a cell.

Thanks in advance.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-11-17T00:29:39+00:00

Hi,

To modify a workbook you have to save it so we can use the before_save event

ALY+F11 to open vb editor. Double click 'ThisWorkbook' and paste this code in on the right. Change the sheet and range to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Sheets("Sheet1").Range("A1").Value = Now

End Sub


If this post answers your question, please mark it as the Answer.

Mike H

Was this answer helpful?

100+ people found this answer helpful.
0 comments No comments

86 additional answers

Sort by: Oldest
  1. Anonymous
    2016-08-10T22:02:50+00:00

    Easy peasy, but should be built in.

    In the area your want the Date Modified to be, type a cell with the label 

    Date Modified. To the right of that cell type   =NOW()  

    Every time the sheet recalculates, a timestamp will be calculated in that cell.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-08-10T22:27:16+00:00

    Thank you, but this doesn't do what I need it to do. I have multiple sheets in a workbook showing different business accounts on each sheet. I need to know when each account was updated when a payment was made. With entering the now () formula on each sheet, when I update one sheet all of the formulas change at the same time showing that each of the accounts was updated when just one of them was actually updated. The now () formula is a workbook formula, not a worksheet unique formula. Any ideas?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-08-11T04:37:53+00:00

    Thank you, but this doesn't do what I need it to do. I have multiple sheets in a workbook showing different business accounts on each sheet. I need to know when each account was updated when a payment was made. With entering the now () formula on each sheet, when I update one sheet all of the formulas change at the same time showing that each of the accounts was updated when just one of them was actually updated. The now () formula is a workbook formula, not a worksheet unique formula. Any ideas?

    Wish I did. M$ has fallen down on the job on this issue IMHO. It would stand to reason that each sheet should be a stand alone, like a record in a database, which should have the ability to annotate date and username modifications. Feature request to M$?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-08-26T23:00:19+00:00

    thank you , this worked for me in Excel 2013!!

    Was this answer helpful?

    0 comments No comments