Right click the sheet tab and select view code and copy and paste the below code in the VBA code window. Return to excel and check
Code solution
![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B:C")) Is Nothing Then Exit Sub If Target.Column = 2 Then Cells(Target.Row, "C").Value = Cells(Target.Row, "A").Value - Target End If If Target.Column = 3 Then Cells(Target.Row, "B").Value = Cells(Target.Row, "A").Value - Target End If End Sub
Bookmarks