Inserting Date/Time of Last Update

L

Lionel B. Dyck

Is there a way to insert a date and time in a cell(s) that will only be updated
if there is a change to the worksheet. I'm looking to have the date/time of the
last update so that it is easy to tell how current the worksheet is.

Thanks
 
N

Nick Hodge

Lionel

You could put some code in a worksheet_Change() event like so (uses A1)

Private Sub Worksheet_Change(ByVal Target As Range)
Range("A1").Value = Now()
End Sub

To implement right click the sheet tab and select view code and paste in
window and save

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
web: www.nickhodge.co.uk
blog: www.nickhodge.co.uk/blog/

FREE UK OFFICE USER GROUP MEETING, MS READING, 27th APRIL 2007
www.officeusergroup.co.uk
 
D

davesexcel

You could place a code in th before save event,
this is in the workbook module

Code:
--------------------
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("A1") = _
"=TEXT(TODAY(),""d-mmmm-yyyy"") & "" "" & TEXT(NOW(),""h:mm AM/PM"")"

End Sub
 
Top