Sum of numbers with only two decimal places wrong

E

Excelgonecrazy

I have a spreadsheet 53000 lines long, with a set of numbers in it.
Each number is only two decimals long although previously was longer.
I have used both the functions Round and Fixed to two decimal places. I have
copied and paste values and tried several different formats.

My issue is when I sum these numbers I get a result of 0.000000078768567858
How am I getting this result from numbers that should only be two decimal
places?
Is there a format or formular that will give me exactly two decimal places
so when added it will only give me a result of two decimal places even when I
view a large number of decimal places as above.
 
B

Bernie Deitrick

You could use the "Precision as displayed" option (tools / options... "Calculation" tab, check
"Precision as displayed" - but be careful with that since you can lose precision), or wrap your SUM
formula in a ROUND function.

HTH,
Bernie
MS Excel MVP
 
D

David Biddulph

Most decimal numbers can't be represented exactly by a fixed point binary
representation. 0.5 can, 0.25 can, but 0.1 can't and 0.01 can't. [As an
exercise, try to work out what the representation would be.]
It's just the same as 1/3 not being able to be represented exactly in fixed
point decimal.

If you've rounded the individual values to 2 decimal places, then you've got
as close as you're going to get with fixed point binary. If you want to
round the final answer to hide the result of the small rounding errors, then
you may do so if you wish. Another option, of course, is to multiply all
your numbers by 100, round to zero places, and work with integers which
should not suffer from such rounding errors. Remember that formatting a
number doesn't change the value, but only the display (unless you use
Precision as Displayed, which has its own risks for the unwary).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top