Title: What to Do When Excel's TRIM Function Doesn't Work
Headings: What to Do When Excel's TRIM Function Doesn't Work
What to Do When Excel's TRIM Function Doesn't Work
Non-Breaking and Regular Spaces
Removing Non-Breaking Spaces
How the Formula Works
Considerations
Was this page helpful?

Content: On a computer, a space between words is not a blank area but a character — and there is more than one type of space character. One space character commonly used in Web pages that TRIM () will not remove is the non-breaking space . If you have imported or copied data from Web pages you may not be able to remove the extra spaces with the TRIM () function if they are created by non-breaking spaces. Non-Breaking and Regular Spaces
Ted French
Spaces are characters and each character is referenced by its ASCII code value. ASCII stands for the American Standard Code for Information Interchange — an international standard for text characters in computer operating environments that creates one set of codes for 255 different characters and symbols used in computer programs. The ASCII code for a non-breaking space is 160. The ASCII code for a regular space is 32 . The TRIM () function can only remove spaces that have an ASCII code of 32. Wikimedia Commons
Different typestyles support different ranges of ASCII codes. The standard table offers 127 possible values;