Je to jen tak narychlo.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("A1")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
If Range("B1").Value - Range("C1").Value < 0 Then
Range("D1").Value = 0
Else
Range("D1").Value = Range("B1").Value - Range("C1").Value
End If
End If
End Sub
Vložit do Modulu listu.citovat