How to mark some columns as ignored for calculations Numbers?
In practice, you could sum each column and then sum just the the sum row.

That way, you can delete the sum of the column to be skipped when needed and it should be clear about which of the columns is ignored.

A more general solution will be tricky since it's programming in conditional values or conditional functions that are much harder to maintain, debug and be confident your math is correct as you use the tool over time.