# If function causing 'accuracy' problem

#### GuyE

##### New Member
I placed a question here yesterday and I guess It wasn't clear enough. I am attaching an excel sheet example but In case it doesn't show up properly, I will describe my problem. I have two identical cells B8=C5, both with positive values. in addition I have a positive value in cell C4. I wrote the following formula in cell C6: "=IF(C4>0,C5-B8,0)". since C5=B8, C5-B8=0, therefore the only solution to the formula has to be 0. for some reson I am receiving a n answer close to 0 but not accurat )9.09494701772928E-13). WHY?
Cell C6 returns an unwanted answer using "IF".
Cell C7 returns the 'proper' answer.
Book2.xls
ABCDE
4condition8000
5Openingbalance50675067
6using"if"function9.09495E-13
8closingbalance50675067
Sheet1

Thanks for any help here. and sorry again for not being clear yesterday

### Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I can't reproduce that given what you have posted.

What's in C5, B8, C6 and C7 when formatted as General? Floating point arithmetic can return very small numbers instead of zero when subtracting.

Is it just a formatting issue? What if you copy the format from C7 to C6?

Replies
8
Views
170
Replies
2
Views
128
Replies
24
Views
710
Replies
6
Views
571
Replies
2
Views
203

1,196,514
Messages
6,015,645
Members
441,913
Latest member
Lhayden_69

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