Hey guys,
I have been working on this macro for a little while now, but need some help refining it. Basically, this is what I would like:
Column B to be marked with the current date/time whenever any information is entered in Columns C through J. However, I do not want this to update every time. I only want it to be marked whenever the first information is entered.
Also, I only want there to be a timestamp present if there is data in Columns C through J. If I delete the information in Columns C through J, I would like the timestamp to be removed.
See below for my current macro:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
With Cell
If .Column = Range("C:C").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
For Each Cell In Target
With Cell
If .Column = Range("D:D").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
For Each Cell In Target
With Cell
If .Column = Range("E:E").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
For Each Cell In Target
With Cell
If .Column = Range("F:F").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
For Each Cell In Target
With Cell
If .Column = Range("G:G").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
For Each Cell In Target
With Cell
If .Column = Range("H:H").Column Then
Cells(.Row, "B").Value = Now()
End If
End With
Next Cell
End Sub
Any ideas?
Thanks,
Chris
Bookmarks