P
Philosophaie
Column "D" is subtracted from "E" the previous total and simulaneously "F" is
added to the mix whenever columns "D,E or F is changed.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oTarget As Range
Dim oIntersect As Range
Set oTarget = Range("D1:F100")
Set oIntersect = Application.Intersect(oTarget, Target)
If Not oIntersect Is Nothing Then
With Sheets("Sheet1")
For n = 2 To 100
.Cells(n, 5) = .Cells((n - 1), 5) + .Cells(n, 6) - .Cells(n,
4)
Next n
End With
End If
End Sub
added to the mix whenever columns "D,E or F is changed.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oTarget As Range
Dim oIntersect As Range
Set oTarget = Range("D1:F100")
Set oIntersect = Application.Intersect(oTarget, Target)
If Not oIntersect Is Nothing Then
With Sheets("Sheet1")
For n = 2 To 100
.Cells(n, 5) = .Cells((n - 1), 5) + .Cells(n, 6) - .Cells(n,
4)
Next n
End With
End If
End Sub