Hello,
I am trying to date stamp a cell when another cell has been changed from a drop down selection list. For instance: If cell A1 is changed, time stamp B1. I have tried both the following codes and they both work for 1 column.
"Private Sub Worksheet_Change(ByVal target As Range)
If target.column = 1 Then Cells(target.Row, 2) = Now()
End Sub"
"Sub Worksheet_Change(ByVal target As Range)
If Intersect(target, Range("g2:g1000")) Is Nothing Then Exit Sub
If target.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
With target.Offset(, 1)
.Formula = Now
.NumberFormat = "m/d/yyyy h:mm:ss AM/PM"
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub"
The problem is that I want to time stamp cells in columns FHJLN, when the column to the left has been modified (EGIKM). So I basically want to repeat the time stamp code for multiple columns. I have tried messing around and can get not more than 2 columns to work at a time.
Any help would be greatly appreciated.
I am trying to date stamp a cell when another cell has been changed from a drop down selection list. For instance: If cell A1 is changed, time stamp B1. I have tried both the following codes and they both work for 1 column.
"Private Sub Worksheet_Change(ByVal target As Range)
If target.column = 1 Then Cells(target.Row, 2) = Now()
End Sub"
"Sub Worksheet_Change(ByVal target As Range)
If Intersect(target, Range("g2:g1000")) Is Nothing Then Exit Sub
If target.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
With target.Offset(, 1)
.Formula = Now
.NumberFormat = "m/d/yyyy h:mm:ss AM/PM"
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub"
The problem is that I want to time stamp cells in columns FHJLN, when the column to the left has been modified (EGIKM). So I basically want to repeat the time stamp code for multiple columns. I have tried messing around and can get not more than 2 columns to work at a time.
Any help would be greatly appreciated.