Вход на сайт
Вопрос по Excel.
1339 просмотров
Перейти к просмотру всей ветки
NightWatch коренной житель
в ответ AURA2 10.07.20 12:54, Последний раз изменено 10.07.20 15:20 (NightWatch)
Private Sub Worksheet_Change(ByVal Target As Range) Dim opdCell As Range Dim accuCell As Range Dim val As Variant With Tabelle1 Set opdCell = .Range("B1") If Not Application.Intersect(opdCell, .Range(Target.Address)) Is Nothing And Application.IsNumber(opdCell.Value) Then If opdCell.Value <> 0 Then val = 0 Set accuCell = .Range("A1") If Application.IsNumber(accuCell.Value) Then val = accuCell.Value End If accuCell.Value = val + opdCell.Value opdCell.Value = 0 End If End If End With End Sub