Show date and time of last change

SBW

New Member
Joined
Jan 9, 2009
Messages
17
Hello,

I have comments in column A and want Column B to reflect the date and time that the comment field was last modified.

For example, in A1, I type "need more information". I would like B1 to reflect the date and time I made the change to A1.

Same would go with the rest of the cells (A2 and B2, A3 and B3, etc)

Let me know if you guys have any ideas!

Thanks.

Sean
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Code:
Private Sub Worksheet_Change(ByVal Target as Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 1 Then Exit Sub
Cells(Target.Row,2) = Now
End Sub
In the Worksheet module
lenze
 
Upvote 0
I'm glad it worked, but personally, I would use a Comment
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 1 Then Exit Sub
Target.ClearComments
Target.AddComment "Changed " & Now & " by" & Environ("UserName")
End Sub
lenze
 
Upvote 0
You can also add other info to your comment, such as previous value!! See
<a href="http://vbaexpress.com/kb/getarticle.php?kb_id=909">Tracking Changes with Comments</a>
lenze
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top