A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sum of numbers with only two decimal places wrong



 
 
Thread Tools Display Modes
  #1  
Old November 13th 07, 07:36 PM posted to microsoft.public.excel.misc
Excelgonecrazy
external usenet poster
 
Posts: 1
Default Sum of numbers with only two decimal places wrong

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.
Ads
  #2  
Old November 13th 07, 08:06 PM posted to microsoft.public.excel.misc
Bernie Deitrick
external usenet poster
 
Posts: 5,444
Default Sum of numbers with only two decimal places wrong

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


"Excelgonecrazy" > wrote in message
...
>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.



  #3  
Old November 13th 07, 08:21 PM posted to microsoft.public.excel.misc
David Biddulph[_2_]
external usenet poster
 
Posts: 8,651
Default Sum of numbers with only two decimal places wrong

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).
--
David Biddulph

"Excelgonecrazy" > wrote in message
...
>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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet defaults numbers automatically to two decimal places Steve Twomey Excel Discussion (Misc queries) 1 June 27th 07 11:52 AM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 11:38 PM
My numbers format as a number with two decimal places. Tim Poulter Excel Discussion (Misc queries) 2 September 18th 05 01:42 AM
Adding numbers in a column that have 3 decimal places KimberlyC Excel Worksheet Functions 4 April 24th 05 01:25 AM
Entering numbers with variable decimal places. Jack Excel Worksheet Functions 8 February 2nd 05 05:35 AM


All times are GMT +1. The time now is 06:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.