I have one that I can't seem to figure out. I'm attempting to have two separate columns record a time stamp using two separate data columns. I cant figure out the code. Example see file. Drop down is used in Column a, time stamp goes in column b. Then drop down is used in column L and time stamp goes into column M . This is all on one worksheet.
I got it figured out.
Dim targetRng As Range
Dim rng As Range
Dim a, k As Integer
Set targetRng = Intersect(Application.ActiveSheet.Range("a:a, k:k"), Target)
a = 1
k = 1
If Not targetRng Is Nothing Then
Application.EnableEvents = False
For Each rng In targetRng
If Not VBA.IsEmpty(rng.Value) Then
rng.Offset(0, a).Value = Now
rng.Offset(0, k).Value = Now
rng.Offset(0, a).NumberFormat = "mm-dd-yy, hh:mm AM/PM"
rng.Offset(0, k).NumberFormat = "mm-dd-yy, hh:mm AM/PM"
Else
rng.Offset(, a).ClearContents
rng.Offset(, k).ClearContents
End If
Next
Application.EnableEvents = True
End If