Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sum does not sum to zero - leaves very small remainder

Hi,
I'm using SUM on a large spreadsheet of dollar type amounts that should only
have information to 2 decimal places and should sum to zero.

The problem is the sum function sums to a small remainder - in this case :

0.000000000069121597334742500000

I've looked at each value and none of them have any decimal values greater
than 2 decimal places.

Any ideas about why this is occuring ?

Regards
Michael
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Sum does not sum to zero - leaves very small remainder

When dealing w/decimals, it may be necessary to use the round function. See
Chip's site for discussion about this issue.

http://www.cpearson.com/excel/rounding.htm


"Michael" wrote:

Hi,
I'm using SUM on a large spreadsheet of dollar type amounts that should only
have information to 2 decimal places and should sum to zero.

The problem is the sum function sums to a small remainder - in this case :

0.000000000069121597334742500000

I've looked at each value and none of them have any decimal values greater
than 2 decimal places.

Any ideas about why this is occuring ?

Regards
Michael

  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Sum does not sum to zero - leaves very small remainder

NG says the post wasn't received - so will try again:

When dealing w/decimals, it may be necessary to use the round function. See
Chip's site for discussion about this issue.

http://www.cpearson.com/excel/rounding.htm



"Michael" wrote:

Hi,
I'm using SUM on a large spreadsheet of dollar type amounts that should only
have information to 2 decimal places and should sum to zero.

The problem is the sum function sums to a small remainder - in this case :

0.000000000069121597334742500000

I've looked at each value and none of them have any decimal values greater
than 2 decimal places.

Any ideas about why this is occuring ?

Regards
Michael

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 837
Default Sum does not sum to zero - leaves very small remainder

Excel (and almost all other software) does binary math. In binary, the only
2-decimal fractions that can be exactly represented are .00, .25, .50, and
..75. All other 2-decimal fractions can only be approximated as a binary
fraction, just as 1/3 can only be approximated as a decimal fraction.

In 4-figure finite precision decimal, 1 - 1/3 -1/3 -1/3 would be 1 -0.3333
-0.3333 -0.3333 = 0.0001. In the same way, when you do finite precision
binary math, there can be predictable minor departures from infiinte
precision, such as you have seen.

Since the issue is approximations to binary numbers that need infinite
precision to represent exactly, and since you are only adding and subtracting
2-decimal fractions, rounding results to 2 decimal places does no violence to
the calculations and can avoid the impact of the binary approximations.

Jerry

"Michael" wrote:

Hi,
I'm using SUM on a large spreadsheet of dollar type amounts that should only
have information to 2 decimal places and should sum to zero.

The problem is the sum function sums to a small remainder - in this case :

0.000000000069121597334742500000

I've looked at each value and none of them have any decimal values greater
than 2 decimal places.

Any ideas about why this is occuring ?

Regards
Michael

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading from Office 2003 Small Bus to Office 2003 Pro Kelly Setting up and Configuration of Excel 0 September 25th 06 06:07 PM
How to change cases from small to capital in all cells? Khoshravan Setting up and Configuration of Excel 3 September 18th 06 09:26 PM
Size of comment box in xml stored spreadsheet becoming small Peter Nolan Excel Discussion (Misc queries) 0 July 8th 06 04:06 PM
Rolling over a Remainder gerberdude Excel Worksheet Functions 2 January 26th 06 08:40 PM
small help can save mee!!!!!!!! taesha Excel Discussion (Misc queries) 0 July 27th 05 09:26 PM


All times are GMT +1. The time now is 02:54 AM.

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

About Us

"It's about Microsoft Excel"