=if(A-B<0.001,"おなじ","違う")

で動作しませんか?