Removes leading and trailing spaces in a specified string. Learn more
In Google Sheets, the TRIM function is used to remove excess spaces from a text string.
It helps clean up data by eliminating leading, trailing, and multiple spaces between words, leaving only a single space between each word.
The syntax for the TRIM function in Google Sheets is as follows:
TRIM(text)
Here, "text" refers to the text or cell reference containing the text you want to trim. The function will return the trimmed version of the text.
For example, let's say you have the text " Hello World " in cell A1. You can use the TRIM function in another cell to remove the excess spaces:
=TRIM(A1)
The result will be "Hello World" with a single space between the words.