Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
c
As
Range, d
As
Range
Set
c = Target:
Set
d = c.Offset(, 1)
If
Intersect(Range(
"C:C"
), c)
Is
Nothing
Then
Exit
Sub
If
Len(c.Formula) = 0
Then
Exit
Sub
If
Not
IsNumeric(c.Value)
Then
Exit
Sub
If
Not
IsNumeric(d.Value)
Then
Exit
Sub
On
Error
GoTo
errh
Application.EnableEvents =
False
d.Value = d.Value + c.Value
errh:
Application.EnableEvents =
True
End
Sub