I was trying VLOOKUP
between two different Excel sheets, but it always returned #N/A
. I found out the problem is on the lookup workbook (second workbook); the value in the cell is a string of alphabets of length 9. But when I use the =len(A1)
formula, it shows 10 characters. So I used TRIM()
, but it still shows 10. Then I used the following answer on "https://stackoverflow.com/questions/9578397/remove-leading-or-trailing-spaces-in-an-entire-column-of-data" :
Quite often the issue is a non-breaking space -
CHAR(160)
- especially from Web text sources -thatCLEAN
can't remove, so I would go a step further than this and try a formula like this which replaces any non-breaking spaces with a standard one=TRIM(CLEAN(SUBSTITUTE(A1,CHAR(160)," ")))
Ron de Bruin has an excellent post on tips for cleaning data here
You can also remove the
CHAR(160)
directly without a workaround formula by
- Edit .... Replace your selected data,
- in Find What hold
ALT
and type0160
using the numeric keypad- Leave Replace With as blank and select Replace All
Still it shows 10 characters, instead of 9. Please help.