My wife and I have a spreadsheet to work out our finances at the beginning of each month and this month has a strange figure in cell F9
.
The formula in cell F9
is ="+ £"&-'Sue''s Outgoings'!C13&" Shortfall"
which should output + £57.35 Shortfall
but it outputs + £57.3500000000001 Shortfall
.
To try and troubleshoot this, I put =-'Sue''s Outgoings'!C13
in cell F13
which outputs exactly what is in 'Sue''s Outgoings'!C13
which is 57.35. (see second image below)
All cells in Sue's Outgoings
sheet are formatted to Currency
format and I temporarily reformatted all cells to General
to see if there was a hidden strange figure in there and there was nothing. All figures in Sue's Outgoings
sheet are straight figures and not results of formulae.
What other reason could there be for the spurious addition of 0.0000000000001 to the result?
"+ £"&-'Sue''s Outgoings'!C13&" Shortfall"
fetches the value, not the displayed form, immediately stringifies it for concatenation, then applies its cell's formatting. See theDOLLAR
function as an example of converting a value to a currency formatted string.'Sue''s Outgoings'!C13
has any impact on the stringification. Cell formatting only affects presentation; it has nothing to do with the computation.