Removing excess spaces and nonprinting characters

Excel 365
Often, data imported into an Excel worksheet contains excess spaces or strange (often unprintable) characters. There are two handy functions TRIM and CLEAN to cleanup such data.

Excel provides you with two functions to help whip your data into shape: TRIM and CLEAN.

  • 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

= TRIM (CLEAN (" Fourth Quarter Earnings "))

See also this tip in French: Suppression des espaces excédentaires et des caractères non imprimables.

Please, disable AdBlock and reload the page to continue

Today, 30% of our visitors use Ad-Block to block ads.We understand your pain with ads, but without ads, we won't be able to provide you with free content soon. If you need our content for work or study, please support our efforts and disable AdBlock for our site. As you will see, we have a lot of helpful information to share.