Cell format incompatibility

M

MikeSD

I have two cells that, to the naked eye, look the same. They are both
formatted as "text". The contents come from two different data sources (one
a spreadsheet and the other a database). When compared with a simple formula
to validate their sameness, (ie. if(a2=b2,"match", not a match") ), the
result is "not a match".

I've tried to force the format by multiplying both cells by 1 in a cut/paste
special effort and then changing them back to Text from General but they
still don't match, to Excel.

It appears that there is some Hidden formatting going on but I can't find
it. Any ideas?

Thanks.
 
E

Elkar

I'm guessing that one (or both) may have trailing spaces? Try this formula:

=IF(TRIM(A2)=TRIM(B2),"match","not a match")

The TRIM function removes irregular and trailing spacing.

HTH,
Elkar
 

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