Spreadsheet Calculator end of line.

Added unit test cases for "almost everything" and max value. Fixed code
to correctly handle several new cases. Does not cover all cases where
borrowing would be required using this method.