Hi everyone.
Please help me understand why my VBa does not work with AutoSum but it works when i put in figures manually in the field.
The VBa is as following
Private Sub Worksheet_Change(ByVal Target As Range)
' Adds Date when Status changes in Column G21
If Target.Count > 1 Then Exit Sub
If Intersect(Target, Range("G21")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Value <> vbNullString Then
Target.Offset(-14, 7 - Target.Column).Value = Now
Target.Offset(0, 8 - Target.Column).NumberFormat = "dd/mm/yyyy"
Else
Target.Offset(0, 8 - Target.Column).ClearContents
End If
Application.EnableEvents = True
End Sub
So, When i add numbers to colum G21 manually, the VBa workd perfectly. but i would like it to work with G21 being a Autosum field so i can change the date when the sum is changing..
Please help guys! its a small but important fix
Please help me understand why my VBa does not work with AutoSum but it works when i put in figures manually in the field.
The VBa is as following
Private Sub Worksheet_Change(ByVal Target As Range)
' Adds Date when Status changes in Column G21
If Target.Count > 1 Then Exit Sub
If Intersect(Target, Range("G21")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Value <> vbNullString Then
Target.Offset(-14, 7 - Target.Column).Value = Now
Target.Offset(0, 8 - Target.Column).NumberFormat = "dd/mm/yyyy"
Else
Target.Offset(0, 8 - Target.Column).ClearContents
End If
Application.EnableEvents = True
End Sub
So, When i add numbers to colum G21 manually, the VBa workd perfectly. but i would like it to work with G21 being a Autosum field so i can change the date when the sum is changing..
Please help guys! its a small but important fix