Sum adds numbers after the decimal that are not there

ajones

Board Regular
Joined
Oct 26, 2002
Messages
106
I have an table of numbers currency (#,###.##) that was exported in Excel with over 6,000 rows. When I add the column of numbers up I get I get something like "65,968.09". However when I wanted to do some comparisons and adding the numbers up a different way I found Excel said the numbers did not match (i.e. a1=b1 returned FALSE).

I then told Excel to display like 20+ digits after the decimal and I got a number like "65,968.08999999910000000000000000". This

The original data was only supposed to deal with dollars and cents, so it should not have anything beyond 2 spots after the decimal. To be sure that was the case I formatted the original data to show 20+ digits after the decimal and everything after the first 2 was zero. I checked it a few different way but it all looks clean.

I noticed that if I did SUMIF() on he same column then added up the totals from 3 types of criteria of the SUMIF I got a different total of the 3 types. In this case "65,968.09000000010000000000"

The three criteria had numbers like:
38,995.71000000010000000000
15,559.50000000000000000000
11,412.88000000000000000000

I now from a rounding and dollars and cents perspective "65,968.08999999910000000000000000" and "65,968.09000000010000000000" are the same.

I have tried adding parts of the number different ways and smaller ranges of the column and unless I get to a small portion of the column then I get variations of the .xxxxxxxxxxxxx type number.

However what is really going on here?

How is Excel adding stuff up that only has 2 digits after the decimal and getting other numbers?

Even if this was right why is adding with sum vs SUMIF adding up all the types of criteria showing two different amounts?

I am seeing this on both Excel 2007 and 2003.

Any thoughts and suggestions would be greatly appreciated.

thanks

Alan
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top