Forum Discussion
Excel - How do I compare calculated values in cells with the IF function?
Couldn't replicate your problem. Have look at the attached workbook. Works for me as it should. Does it work for you?
!!! I opened a new sheet in the financia records file and entered the example you posted, and both
=A1=B1 and IF(A1=B1,"True","False")
work OK!!!
So it is something about the sheet I am doing all the calculations on that is the problem.
I may be able to work around the problem by placing the comparisons on another sheet and referring back to the results on the calculations sheet. But someday I want to squash this bug!
Phil
I tried it and when I copy the values from the Calculations sheet into a new blank sheet and then do the comparisons they fail!
AHA! I copied and pasted values into the cells on the new sheet. One value from the Calculations sheet is 3052.90000000002, and the other is 3052.9!
Since these are all supposed to be dollars and cents values I don't know where the extra $0.00000000002 came from, but now I know what to look for.
So it is just a strange problem in the data.
Nevermind! But thanks for your help!