Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet
Dim cellToUpdate As Range
Dim cellType As String
Set ws = ThisWorkbook.Worksheets("Balance system")
If Not Intersect(Target, Me.Columns("D")) Is Nothing And IsNumeric(Target.Value) Then
cellType = Target.Offset(0, -1).Value
Select Case cellType
Case "A"
Set cellToUpdate = ws.Range("D12")
Case "B"
Set cellToUpdate = ws.Range("D13")
Case "C"
Set cellToUpdate = ws.Range("D14")
End Select
If Not cellToUpdate Is Nothing Then
cellToUpdate.Value = cellToUpdate.Value + Target.Value
End If
End If
End Sub