What it does: The TRIM() function removes extra spaces from a text string, whether at the beginning, middle, or end. It will also remove extra paragraph breaks (ASCII Character #10) at the beginning and end of a text
Plain English: As you’re cleaning data, you may arrive at cells with extra space characters at the beginning, middle, and end of the cell. For example, this function would change
" This has been a very unproductive week "
"This has been a very unproductive week"
Notice the extra spaces eliminated at the beginning, middle, and end of the string.
The screenshot above shows the elimination of several extra spaces and a paragraph break at the end of E3.