Excel formula timestamp for a data entry of a referenced cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to make a cell display the date/time of a referenced cell when
it has been updated/data changed. The formula =IF($A1>0,NOW(),"") for
example, updates all similar formulas in the entire worksheet (entire column
when autofilled). Does Microsoft make a timestamp for the data entry of a
referenced cell? ...or could you guys please consider putting one in a later
excel version.
Thank you!

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions
 
jmasaki said:
I would like to make a cell display the date/time of a referenced cell when
it has been updated/data changed. The formula =IF($A1>0,NOW(),"") for
example, updates all similar formulas in the entire worksheet (entire column
when autofilled). Does Microsoft make a timestamp for the data entry of a
referenced cell? ...or could you guys please consider putting one in a later
excel version.

Think you could make it happen right now <g> ..

Try JE McGimpsey's coverage of "Time and date stamps" at his page:
http://www.mcgimpsey.com/excel/timestamp.html

A sample implemented with JE's first sub (below) is available at:
http://www.savefile.com/files/5575880
Date_Time_Stamping.xls

---------
Steps:
Right-click the sheet tab > Choose View code
Clear the defaults, and paste-in JE's code below
(from: http://www.mcgimpsey.com/excel/timestamp.html)
Press Alt+Q to get back to Excel

Test it out. When you input entries into A2:A10, the date/time stamp will be
logged into col B. Clearing entries will clear the corresponding stamps.
Adapt the range to suit: Range("A2:A10").

'-------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
'------

---
 

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

Back
Top