Simple formula doesn't add up right

ChrisHar

New Member
Joined
May 16, 2017
Messages
2
I've been seeing some weird results with some simple adding/subtracting formulas, for example

A1 is 1.1
A2 is 0.8
A3 is 0.3
A4 is 0
A5 is =A1-A2-A3-A4

A5 displays 55.55112E-17 when formatted General, and 0.00000000000000005551115123 when formatted to Number, which is essentially the same thing.

Why doesn't it display zero?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
That's due to the vagaries of binary represention computers use.

Try:

=ROUND(A1-A2-A3-A4<strike></strike>,0)
 
Upvote 0
I would think that because most of the terms in A1:A4 have one decimal place, they would probably want to round to one decimal instead of the nearest whole number, i.e.
=ROUND(A1-A2-A3-A4<strike style="color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);"></strike>,1)

Here is an explanation of the issue that Aladin is referring to:
https://support.microsoft.com/en-us...ithmetic-may-give-inaccurate-results-in-excel

By the way, welcome to the board!
 
Last edited:
Upvote 0
Thanks Aladin and Joe, i figured there would be a logical explanation for it! Nice article explaining it too.
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,938
Members
448,534
Latest member
benefuexx

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