Removing excess spaces and nonprinting characters
Excel offers two functions to help whip your data: TRIM and CLEAN.
- TRIM removes all leading and trailing spaces and replaces internal strings of multiple spaces with a single space:
- CLEAN removes all nonprinting characters from a string. These "garbage" characters often appear when you import certain types of data:
To remove all extra spaces and nonprinting characters, use these two functions:
= TRIM (CLEAN (<data>))
See also this tip in French: Suppression des espaces excédentaires et des caractères non imprimables.