# Excel formula returning -0 instead of 0

#### ibertram

##### New Member
Hi there,

I am trying to run a function here but it seems that the function will return a negative value only if the values are as follows.

A: 84.90
B: 57.16
C: 27.74

Excel function:
=IF((+A-B-C)=A,0,(+B+A-C))

if I am to play around with values B and C. I will be able to get a positive 0.
i.e. 57.15, 27.75 or 57.17,27.73

Hope someone can help.
Thanks.

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
It may be due to how you format the cell.

If you are using a non-decimal (integer) format and the number is less than 0 and more than -1 (eg. -0.5) then it would be displayed like that.

After modifying your formula with actual cell references, your formula returns 114.32
Book1
ABCDE
184.957.1627.74114.32
Sheet1

Let's say you have:
Column A1: 57.16
Column B1: 27.74
Column C1: 84.90

In Column D1, you have this formula: =(\$A\$1+\$B\$1)-\$C\$1. Result would be 0
But if you have this formula in column E1: =IF((\$A\$1+\$B\$1)-\$C\$1) = 0, "it
is zero", "it is not zero"). Result would be "it is not zero". Strange
huh?

It seems that it only happens to this set of number.

Replies
7
Views
243
Replies
2
Views
232
Replies
2
Views
128
Replies
42
Views
719
Replies
5
Views
289

1,196,409
Messages
6,015,106
Members
441,870
Latest member
kojack

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