Excel Sheet Timestamp

G

Guest

How do I insert a timestamp for the last time a sheet was saved? I've looked
at the NOW and TODAY functions, but these change each time I open the sheet.
I only want the formula to change IF I save the sheet. Can anyone offer any
suggestions?
 
R

Richard Buttrey

How do I insert a timestamp for the last time a sheet was saved? I've looked
at the NOW and TODAY functions, but these change each time I open the sheet.
I only want the formula to change IF I save the sheet. Can anyone offer any
suggestions?

In Workbook BeforeSave event put

Range("MyTimeStamp") = Time


HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
D

ducky

DRK said:
How do I insert a timestamp for the last time a sheet was saved? I've looked
at the NOW and TODAY functions, but these change each time I open the sheet.
I only want the formula to change IF I save the sheet. Can anyone offer any
suggestions?

are you looking for VBA code or a formula?

AR
 
W

willwonka

Place this code in the "ThisWorkbook" Module.

To get to VBA, Hit Alt-F11


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
Range("d1") = Now
End Sub
 
R

Roger Govier

Hi

You can't use a formula (as it will change each time as you have found).
That is why others have suggested a VBA solution to provide the date or
timestamp..
If you want to enter to a cell manually, then

To enter Date into a cell type Ctrl + ; - that's Control + semicolon
To enter Time into a cell type Ctrl + : - that Ctrl + colon or Ctrl
+ Shift + semicolon
 
G

Guest

I see. Thanks, this looks like it works!

Roger Govier said:
Hi

You can't use a formula (as it will change each time as you have found).
That is why others have suggested a VBA solution to provide the date or
timestamp..
If you want to enter to a cell manually, then

To enter Date into a cell type Ctrl + ; - that's Control + semicolon
To enter Time into a cell type Ctrl + : - that Ctrl + colon or Ctrl
+ Shift + semicolon
 
P

plb2862

DRK said:
How do I insert a timestamp for the last time a sheet was saved? I've
looked
at the NOW and TODAY functions, but these change each time I open the
sheet.
I only want the formula to change IF I save the sheet. Can anyone offer
any
suggestions?
Personnally I use
date with time (ctrl+semicolon)(space)(ctrl+Shift+colon)
Apply what ever format you want
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top