Hey I Need some Help with This Code
the code works fine for colum "L" but i need it work on severel Colom's
the Colom's i need is "L" and "U" and "AD" and "AM" and "AW"
hope that are enough Info
the code works fine for colum "L" but i need it work on severel Colom's
the Colom's i need is "L" and "U" and "AD" and "AM" and "AW"
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns("L"), Target.Parent.UsedRange) Is Nothing Then
On Error GoTo Safe_Exit
Application.EnableEvents = False
Dim rng As Range
For Each rng In Intersect(Target, Columns("L"), Target.Parent.UsedRange)
If CBool(Len(rng.Value2)) And Not CBool(Len(rng.Offset(0, 1).Value2)) Then
rng.Offset(0, 1) = Now
ElseIf Not CBool(Len(rng.Value2)) And CBool(Len(rng.Offset(0, 1).Value2)) Then
rng.Offset(0, 1) = vbNullString
End If
Next rng
End If
Safe_Exit:
Application.EnableEvents = True
End Sub
hope that are enough Info