Removing excess spaces and nonprinting characters
Removing excess spaces and non printing characters Often data imported into an Excel worksheet contains excess spaces or strange (often unprintable) characters. Excel provides you with two functions to help whip your data into shape: TRIM and CLEAN: TRIM removes all leading and trailing spaces, and it 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(“ Fourth Quarter Earnings “)