# A very simple minus calculation based on same values but show difference?

#### agasi

##### New Member
When I compare a,b I get "True". But when I subtract a-b although it shows 0.00 if I increase decimals, it is not 0.00. Does anyone know why it shows the difference?​

a: 145.454545454545000000000000

b: 145.454545454545000000000000

 Result: -0.000000000000426325641456

<tbody>
</tbody><colgroup><col></colgroup>

<tbody>
</tbody><colgroup><col></colgroup>

<tbody>
</tbody><colgroup><col></colgroup>

### 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.
Are the values in A and B derived from formulae? If so, do you have the ROUND function applied?

They are derived from formula but no Round used.

What are the formulae? And what are the values used in the formulae? Are any of those rounded?

When I compare a,b I get "True". But when I subtract a-b although it shows 0.00 if I increase decimals, it is not 0.00. Does anyone know why it shows the difference?​

a: 145.454545454545000000000000

b: 145.454545454545000000000000

 Result: -0.000000000000426325641456

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>
In simple terms, this is the result of conversion of computer-readable binary numbers into human-readable decimals.

a: sum of the below (all hardcoded)
0.00000000000
29.54545454545
0.00000000000
115.90909090909
0.00000000000

b: (sum of A/325)*325

sum of A /
 325.0000000000000000 * 325.0000000000000000

<tbody>
</tbody><colgroup><col></colgroup>

<tbody>
</tbody><colgroup><col></colgroup>

Tetra, thanks. But is there any other way apart from using Round? It should be zero to match the look up criteria (zero).

There might be, but using ROUND(...,n) is the easiest way. You should always use it when comparing non-hardcoded floating-point numbers.

Tetra201, okay. Thanks.

You are welcome.

Replies
1
Views
1K
Replies
17
Views
540
Replies
22
Views
641
Replies
1
Views
285
Replies
1
Views
340

1,196,484
Messages
6,015,469
Members
441,898
Latest member
kofafa

### 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.

### Which adblocker are you using?

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

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