Re: "It leaves the trailing spaces"
Most likely those spaces are Character 160 (called a non-breaking space).
This formula removes almost all unnecessary characters...
=SUBSTITUTE(CLEAN(TRIM(A2)), CHAR(160), "")
This formula gets just the non-breaking spaces...
=SUBSTITUTE(A2, CHAR(160), "")
The 'Clean Data' utility in my free "Professional_Compare" workbook will do
it for you without having to use a helper column.
Download from OneDrive...
https://1drv.ms/u/s!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU
'---
Nothing Left to Lose
Re: "It leaves the trailing spaces"
Most likely those spaces are Character 160 (called a non-breaking space).
This formula removes almost all unnecessary characters...
=SUBSTITUTE(CLEAN(TRIM(A2)), CHAR(160), "")
This formula gets just the non-breaking spaces...
=SUBSTITUTE(A2, CHAR(160), "")
The 'Clean Data' utility in my free "Professional_Compare" workbook will do
it for you without having to use a helper column.
Download from OneDrive...
https://1drv.ms/u/s!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU
'---
Nothing Left to Lose
Your advice worked perfectly. Thanks. I though it probably had to do with hard spaces, but I did not know how to get rid of them.
excel - Trim function and WorksheetFunction.Trim do not remove leading or trailing spaces - Stack Overflow
Trim Function Not Behaving as Expected
excel - Trim Command Not Working - Stack Overflow
string - Trim not removing white spaces? - Stack Overflow
I have a sheet of names where there are single space, double space, triple spaces at the beginning of the data. TRIM function only works on single spaces and TEXT TO COLUMN isnt ideal as the spaces vary in different cells. What is the cure.
Edit:Thanks everyone for ur help.