To use VBA
Right click on the worksheet tab and "View Code"
Copy and paste this code into the now open VBA editor
Private Sub worksheet_Change(ByVal Target As Range)
If Target.Count = 1 And Target.Address = "$A$1" Then
Application.EnableEvents = False
Cells(2, 1).Value = Cells(3, 1).Value - Cells(1, 1).Value 'Cells(row,column) thus Cells(2,1) = A2
End If
If Target.Count = 1 And Target.Address = "$A$2" Then
Application.EnableEvents = False
Cells(1, 1).Value = Cells(3, 1).Value - Cells(2, 1).Value
End If
Application.EnableEvents = True
End Sub
Close the VBA editor (no need to save). Code is set for A1, A2 and A3 as per your example
Bookmarks