lewashby85
New Member
- Joined
- Aug 1, 2017
- Messages
- 2
I'm using the following VBA script in my excel file at work to auto fill in today's date in the column to the right when I enter data into the column to the left. It's working but the only thing I don't like is it is also inserting today's date into the column on the right even when I delete data from the column on the left. I only want it to insert data into the left hand column when data is added/inserted into the left hand column, not when removing data from the left hand column.
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If (Target.Count = 1) And _
(Not Intersect(Target, [H:H]) Is Nothing) Then _
Target.Offset(0, 1) = Date
End Sub