< Go Back

Excel TRIM Function

Formula

=TRIM(text)

Summary for the Excel TRIM Function

The Excel TRIM function removes unnecessary spaces from the text, leaving just single space in between words. It adds no space characters either at the beginning of the text or at the end.

Purpose of the Excel TRIM Function

Remove unwanted and unnecessary spaces from a text

The Return Value for the Excel TRIM function

Text with one space between words and no space at the beginning and end.

Logical Arguments used for the Excel TRIM Function

  • Text – This is the text in which unwanted spaces need to be removed

Figure 1: Example of how to use the Excel TRIM function to remove unnecessary spaces in the text

Usage Notes of the Excel TRIM Function

  • The TRIM function removes unnecessary gaps from the text, leaving just single spaces between words and no space at the beginning of a text or at its end.
  • The TRIM function can serve a useful purpose to clean up text sourced from different applications.
  • Only ASCII space character (32) is what the Excel TRIM Function removes from the text.
  • For Unicode text that usually contains a continuous space character (160) which shows up as HTML entity on web pages. In cases like these, this cannot be eliminated using the Excel TRIM function.
Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment

avatar