ddwestenskow
New Member
- Joined
- Jul 11, 2008
- Messages
- 10
I am very new to the world of VBA in Excel and I am struggeling to adapt this code to what I need. As is, it simply puts a date stamp into cell AJ2 when anything is changed in A2-AJ2. While this code works great I have been attempting to apply it to the rest of the columns in the work book with out having to list each of the rows and cells in the code. I know that there is a simple answer, please have pitty on a newby!
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, [A2:AI2]) Is Nothing Then
[AJ2] = Date
End If
End Sub
(this is obviously the code that runs correctly)
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, [A2:AI2-A10000:AI10000]) Is Nothing Then
[AJ2-AJ10000] = Date
End If
End Sub
(this is one of many unsuccesfull attempts to alter it)
Thanks in advance for any help,
Dawson
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, [A2:AI2]) Is Nothing Then
[AJ2] = Date
End If
End Sub
(this is obviously the code that runs correctly)
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, [A2:AI2-A10000:AI10000]) Is Nothing Then
[AJ2-AJ10000] = Date
End If
End Sub
(this is one of many unsuccesfull attempts to alter it)
Thanks in advance for any help,
Dawson