4 replies
by ofiewura Accepted solution
by oldbaritone Accepted solution
by jon peltier Accepted solution
You could put =NOW() into a cell and it will display the date and time when it was last recalculated. Format as m/d/yyyy to show only the date.
If you want to show when the cell was last modified you will need to use code to add the date to a cell comment.
by dippncope Accepted solution
Found this on MrExcel.com , http://www.mrexcel.com/archive/VBA/553.html ,years ago and have had it bookmarked since then,
It will create a comment box for each cell that gets modified.
Only thing I did was modify it to add the time.
Create a new sheet in your excel spreadsheet and name it historical data
Go to sheet you want to check and hit alt-F11 to open VB editor and paste whats between the ****
Save spreadsheet and reopen. You you can hide the historical data worksheet if needed.
*******Code Below**********
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error Resume Next
here = Target.Address
newnum = Target.Value
oldnum = Sheets("historical data").Range(here).Value
If oldnum = "" Then GoTo line99
oldcomment = Target.Comment.Text
Target.AddComment
Target.Comment.Text oldcomment & "Modified on " & Date & Time & " by " & _
Application.UserName & ". Previous value was " & oldnum & Chr(10)
line99:
Sheets("historical data").Range(here).Value = newnum
End Sub
***Code Above*************
This discussion is closed to new replies.
Trending Software posts
Sort by Trending