Here is my formula: =Round(If(AND(0<=B2-J7<=0.1,H7>0),E7+U2)

B2 = .35

J7 = .3176

h7 = 1

E7 = .81

U2 = .03

Based on these numbers the formula should result in the cell equaling .84

It is unclear what you want to return if the conditions are not met. I will assume zero (FALSE).

If B2 and J7 are always less than 1, you are safe with the following, by coincidence:

=ROUND(IF(AND(0<=B2-J7,B2-J7<=0.1,H7>0),E7+U2),2)

But if B2 and J7 might be greater than 1, I think you should write:

=ROUND(IF(AND(0<=B2-J7,

ROUND(B2-J7

,4)<=0.1,H7>0),E7+U2),2)

I choose to round to 4 decimal places because that is the apparent precision of J7.

The issue is: B2-J7<=0.1 might return FALSE even though the difference appears to be 0.1

__on paper__. For example, consider when B2 is 5.03 and J7 is 4.9300.

This is due to anomalies of 64-bit binary floating-point arithmetic, which Excel uses to represent numbers.

Most non-integers cannot be represented exactly. So they are represented by an approximation that might be infinitesimally less than or greater than the decimal fraction. For example:

Rich (BB code):

```
5.03 5.03000000000000,024868995751603506505489349365234375
4.93 4.92999999999999,971578290569595992565155029296875
5.03-4.93 0.100000000000000,53290705182007513940334320068359375
0.1 0.100000000000000,0055511151231257827021181583404541015625
```

(I use period for the decimal point and comma to demarcate the first 15 significant digits, which is all that Excel will format, rounding the 16th digit, an arbitrary limitation.)
Note that the internal representation of 5.03 is larger, and the internal representation of 4.93 is smaller. So their difference is larger than the internal representation of 0.1.

In this example, their difference rounded to 15 significant digits is 0.100000000000001, which is visibly larger than 0.1.

When B2=J7 rounded to 15 significant digits is the same as 0.1, B2-J7<=0.1 returns TRUE even if the internal representation of B2-J7 is actually larger than the internal representation of 0.1. This is a quirk of Excel. VBA would still return FALSE.