Why is this not working?

KentuckyGal

New Member
Joined
Mar 17, 2009
Messages
2
I have a simple formula that is not working and I can't figure out why:

Cell A1=10.66

Cell B1=675.34
Cell B2=664.68
CellB3=B1 minus B2 (10.66)

In Cell C3 I have a simple formula asking to compare A1 to B3, if they are the same value, say YES, if they are not the same value say NO.

here is the formula in cell C3: =IF(A1=B3,"yes","no")

Since both values are 10.66, the reults should say YES, but I keep getting NO and I can't figure out why this is not working. I've tried tinkering with the formatting of the cells, they are set up as numbers. Can anyone help? I am out of ideas.
Thanks,
Kentucky Gal
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi

When using decimal values you really need to round the values before comparison (otherwise Excel's limited precision may come into play) so you should write your formula as:

=IF(ROUND(A1-B3,2)=0,"yes","no")
 
Upvote 0
It may be a floating arithmetic precision error. Try

=IF(ROUND(A1,5)=ROUND(B3,5),"yes","no")
 
Upvote 0
For further understanding why this is happening, check out this site:

http://support.microsoft.com/kb/78113

thumbup.gif
 
Upvote 0

Forum statistics

Threads
1,203,642
Messages
6,056,500
Members
444,872
Latest member
Vishal Gupta

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