I dont see how they can be different, even if you do change a value in a row above?

=N6-N18-N31
N6=SUM(N27:N30)
N29=SUM(B29:M29)
the same for N28 and N27...so these sum their respective rows - and this is what happens in ALL rows that have data entry, and each "column total", sums (or subtracts) down - so the 2 totals must be the same.

If you want to use the same formula in N35 as in M35 (=N23-N31), all yoy need to do is include a sum() for row 23 =SUM(B23:M23)