t_faragher13
New Member
- Joined
- Apr 5, 2011
- Messages
- 12
I've got an excel sheet with a number of user filled columns. I would like the date that an entry is added to each column to be entered into the next column for each one.
I've found this script
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim VRange As Range, cell As Range
Dim Msg As String
Dim ValidateCode As Variant
Set VRange = Range("I:I")
For Each cell In Target
If Union(cell, VRange).Address = VRange.Address Then
cell.Offset(, -1) = Date
End If
Next cell
End Sub
Which does what I want, but just for the one column I:I. I cant work out how to make it work for multiple columns in the same worksheet.
Can anyone help me with this?
I've found this script
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim VRange As Range, cell As Range
Dim Msg As String
Dim ValidateCode As Variant
Set VRange = Range("I:I")
For Each cell In Target
If Union(cell, VRange).Address = VRange.Address Then
cell.Offset(, -1) = Date
End If
Next cell
End Sub
Which does what I want, but just for the one column I:I. I cant work out how to make it work for multiple columns in the same worksheet.
Can anyone help me with this?