Private Sub Worksheet_Change (ByVal Target as Excel.Range)
Dim V As Long
Application.EnableEvents = False
Set rng1 = Application.Union (Range ("a1: g1"), Range ("H: IV"))
Set rng = Application.Intersect (Target, rng1)
If Not rng is nothing then Exit Sub
V = Target.Offset (0, 12). Value
If Target.Offset (0, 12) = "" Then
With Range ("H" & Target.Row)
. Value = Target.Address & ": first entry by " & Application.UserName & " at " & Now ()
. ColumnWidth = 60
. Interior.ColorIndex = 33
End With
Target.Offset (0, 12). Value = Target.Value
Application.EnableEvents = True
Exit Sub
End If
Target.Offset(0, 12).Value = Target.Value
With Range("H" & Target.Row)
.Value = Target.Address & " changed from " & V & " to " & Target.Value & " by " & Application.UserName & " at " & Now()
.ColumnWidth = 60
.Interior.Color = vbYellow
End With
Application.EnableEvents = True
End Sub
Bookmarks