Hello B.Baumgartner,
The second range in this example, D2:D101, is the same size as the first, but they can be different sizes. You need to use the Union method...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
Set rng = [A2:A101]
rng = Union(rng, [D2:D101])
If Intersect(Target, rng) Is Nothing Then Exit Sub
If IsEmpty(Target) Then
Target.Offset(0, 4).Value = ""
Target.Offset(0, 1).Value = ""
Else
Target.Offset(0, 4).Value = Application.UserName
Target.Offset(0, 1).Value = Date
End If
End Sub
Sincerely,
Leith Ross
Bookmarks