Do you just do not want negatives, or do you want it so you can't subtract more than is available?

So, using the Abs function as Allan has said, would yield 7 instead of -7 but if you want only to subtract what is available (so in this case you would only want to subtract 5 instead of 12 because 5 is all that is left) that would require some other calculation. So, which would it be?