Google Sheets Function: TRIM

The TRIM function removes unnecessary spaces at the beginning and end of a string, as well as double spaces within the string.

Usage:

=TRIM(text)


Example of Use

The TRIM function here should remove all unnecessary spaces from the cell to its left:

=TRIM(A2)
google sheets function trim

Then drag down:

google sheets function trim spaces

The unnecessary spaces have been successfully removed.