IF Statement not working

B

Barrett M

My formula IF(E5<>G5, "Not Equal", "Equal") will only give the message "Not
Equal" even if the values are equal, however if i copy the formula into a new
worksheet and the values are equal it will return the Correct value of
"Equal".
Thanks for your help.
 
D

Dave

Hi,
If either E5 or G5 is a calculated value, there may be hidden decimals
present.
ie, the cell may display 123 but the actual value may be 123.000056
Dave.
 
B

Barrett M

The valurs are two to three digit characters such as AB BC CD also _AB _BC _CD

Thanks again
 
S

Spiky

Any Ideas?

I seem to say this often.

Is this a file that was created in a different version of Excel than
you currently use? All sorts of stupid things like this happen.

Regardless, and you already said this works, the answer is probably:
Select All
Copy
Paste (in new file)
 
D

David Biddulph

Have you checked for spaces or other non-printing characters?
Use =LEN(E5) and =LEN(G5) to check whether the string is longer than you
expected.
 
D

David Biddulph

REPLACE function
SUBSTITUTE function
TRIM function
CLEAN function
Edit/ Replace.
 

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