Removing excess spaces and nonprinting characters
- TRIM removes all leading and trailing spaces and replaces internal strings of multiple spaces by a single space.
- CLEAN removes all nonprinting characters from a string. These "garbage" characters often appear when you import certain types of data.
This example uses the TRIM function. The formula returns Fourth Quarter Earnings (with no excess spaces):
=TRIM(CLEAN(" Fourth Quarter Earnings "))
Permission is granted for article quotations from OfficeToolTips, provided the direct link to the source articlehttp://www.officetooltips.com/excel 2016/tips/removing excess spaces and nonprinting characters.html