The Google Sheets TRIM function is used to remove extra spaces from text except for single spaces between words. This means it will eliminate leading and trailing spaces, as well as any extra spaces in between the words of the text which leaves only one space between each word.
The syntax of the TRIM function is:
TRIM(text)
text is the string or reference to a cell containing the text you want to clean up.
Follow the steps below to use the TRIM function in Google Sheets.
Click on the cell where you want to display the cleaned text, such as B1 next to your first text entry.
Type =TRIM( into the selected cell to start the function for cleaning text.
Specify the cell reference containing the text you want to clean. For example, input =TRIM(A1) to clean the text in cell A1.
Finish your formula with a ) and press Enter. Extra spaces from the reference cell should now be removed.
Copy the TRIM function from B1 and paste it into cells B2 through B5, adjusting the cell references as necessary.
Review the cells with the TRIM function applied. Ensure that extra spaces are removed from the text.
We hope that you now have a better understanding of how to set up Google Sheets TRIM function. If you enjoyed this article, you might also like our article on how to clear contents in Google Sheets or our article on how to use Google Sheets offline.