Where are the decimals coming from?

Solari

New Member
Joined
Jun 1, 2018
Messages
16
I have a problem regarding the SUM-function. It doesn't seem to be able to correctly sum the numbers put in a sheet.

I guess it has to do with some sort of formatting, but I genuinely have tried to format it to the best of my knowledge.

I have put in all the numbers manually using 3 decimals for each cell, still the sum seems to think it has 16 decimals!
All the cells have the same format. How is this possible?:confused:

[TABLE="width: 335"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,630000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,510000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]0,520000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1,600000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]55,300000000000000000000000000000[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]-63,152000000000000000000000000000[/TD]
[/TR]
[TR]
[TD]SUM:[/TD]
[TD="align: right"]0,087999999999993900000000000000[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Click on a number that makes up part of the SUM.

What does it display in the formula bar (just above columns D and E)?
If it displays long numbers like 0,5212345760808089079669 then that's what the values are (not 0,52) as displayed in the sheet and explains why you have a long SUM total.
 
Upvote 0
Click on a number that makes up part of the SUM.

What does it display in the formula bar (just above columns D and E)?
If it displays long numbers like 0,5212345760808089079669 then that's what the values are (not 0,52) as displayed in the sheet and explains why you have a long SUM total.

Thank you, but that isn't the explanation. All the numbers have been entered by me, manually and I have checked them more than one time, they all are registered as 2 or 3 decimals long.
 
Upvote 0
unevitable i'm afraid
it's a result of binary storage of the numbers
example: 0,1 to binary is like 0,0001100110011. . .
NB this is not a completely watertight answer but a bit of a shortcut
 
Upvote 0
unevitable i'm afraid
it's a result of binary storage of the numbers
example: 0,1 to binary is like 0,0001100110011. . .
NB this is not a completely watertight answer but a bit of a shortcut

See this link for an explanation of the issue, and workarounds:
https://support.microsoft.com/en-us...ithmetic-may-give-inaccurate-results-in-excel

Using "Precision as Displayed" or the ROUND formula are the most common ways to correct this.

Thank you both!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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