Hi,
I have the following which works a treat in range "h:h", but I want it to do the same thing for m:m and p:p
Any ideas?
![]()
Private Sub Worksheet_Change(ByVal Target As Range) 'Update 20140722 Dim WorkRng As Range Dim Rng As Range Dim xOffsetColumn As Integer Set WorkRng = Intersect(Application.ActiveSheet.Range("h:h"), Target) xOffsetColumn = 1 If Not WorkRng Is Nothing Then Application.EnableEvents = False For Each Rng In WorkRng If Not VBA.IsEmpty(Rng.Value) Then Rng.Offset(0, xOffsetColumn).Value = Now Rng.Offset(0, xOffsetColumn).NumberFormat = "dd/mm/yy" Else Rng.Offset(0, xOffsetColumn).ClearContents End If Next Application.EnableEvents = True End If End Sub
Bookmarks