Remove trailing space

  • Thread starter Thread starter NusratRahman
  • Start date Start date
N

NusratRahman

I am comparing two names column(A&B) I using

=IF(A1=B1,0,1) or Exact(A1,B1) But in every case my
results comes false because even though the two coulms
have same value but their lenths are difference.

Q: How to remove trailing space to both coulm have same
lentgh.

Thanks.
 
Try

=IF(TRIM(A1)=TRIM(B1),0,1)

if that doesn't work then you don't have trailing spaces but most likely
trailing HTML characters
then try

=IF(SUBSTITUTE(TRIM(A1,CHAR(160),""))=SUBSTITUTE(TRIM(B1,CHAR(160),"")),0,1)
 
Back
Top