Hi I found this code online. So far this code works fine. When I enter a value in column A, the date is recorded in the adjacent column. Cool! But, I do not understand this code and would like to add comments to each line so I understand how it works. Could someone clearly dissect this code for me? Also, if I were to make the macro more robust by capturing the date and time when a particular target value is entered into column A ,.. for example [If there is a drop down list of restricted values "Yes" and "No"], I would want to capture the date and time when the user chooses "yes", and only the first instance of when this event occurs. how would that code look? Please include comments. Much Appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
With Target(1, 2)
.Value = Date