Cell format incompatibility

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Back
Top