IF statement does not work with "=" sign

G

Guest

I have a simple if statement:
=IF(B42=B44,"Balanced","Not Balanced")
B42 and B44 are exactly the same dollar amount but it says "not balanced".
Both b42 and b44 are formatted as dollar amounts. The cell in question with
this statement is formatted as 'general'. I tried using other cells etc. I
used a 'watch' window and it stated the values of B42 and B44 as the same.
Thanks
Bill
 
G

Guest

They may appear the same but if they have been calculated they not match
exactly.

If they are dollar amounts (no cents) try:

If (int(b42)=int(b44),"Balanced","Not balanced")

or

If (Round(b42,0)=round((b44,0),"Balanced","Not balanced")

If cents required, multiply by 100.

HTH
 
B

Bob Phillips

If a dollar amount, more probably

=If (Round(b42,2)=round((b44,2),"Balanced","Not balanced")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top