August 2, 2021

TRIM function in Google Sheet

In this lesson we will learn how the TRIM function works in Google Sheet. The TRIM function is used to remove leading/trailing/consecutive multiple spaces between words in Google Sheet.

=TRIM(text)
  • text : This is the string or a reference to a cell containing text string to trim.

Let’s understand with a simple example. In below table we have several strings in column A containing leading/trailing/consecutive multiple spaces between words.

In cell B1 we have used the below TRIM function and dragged the same for the following cells in column B to update the respective cell reference for column A.

TRIM(A1)

By using TRIM function all leading/trailing/consecutive multiple spaces between words in the cells of column A have been removed in the respective cells in column B. Even the numeric digits and special characters are all treated as text string and trimmed as follows.

Remember the TRIM function won’t remove the single space between words.

Check here to learn how the TRIM function works in Excel.

Leave a Reply

Your email address will not be published. Required fields are marked *