Google Sheets TRIM Function

This post will guide you how to use Google Sheets TRIM function with syntax and examples.

Description


The Google Sheets TRIM function removes all spaces from text string except for single spaces between words.  You can use the TRIM function to remove extra spaces between words in a string. Or removes leading and trailing spaces from the text.

The TRIM function can be used to remove extra spaces from a given text string, it will leave only a single space between words in google sheets.  The purpose of this function is to remove extra spaces from text. and its returned value is a text with extra spaces removed.

The TRIM function is a build-in function in Google Sheets and it is categorized as a Text Function.

Syntax


The syntax of the TRIM function is as below:

= TRIM (text)

Where the TRIM function argument is:

  • Text -This is a required argument. The text string from which you want to remove the extra spaces.

Note:

  • TRIM Function only removes extra spaces in a text string, leaving just a single space between words.
  • TRIM function is very important when text is used in formulas or data validation.
  • TRIM function only removes the ASCII space character from a text string.
  • Whitespace or non-breaking space will not be trimmed. If you

Google Sheets TRIM Function Examples


The below examples will show you how to use google sheets TRIM function to remove extra spaces.

#1 To remove leading spaces in the Cell B1, Just using the following formula:

=TRIM(B1)

google sheets trim function1

#2 To remove multiple spaces between two words in B2, using the below excel formula:

=TRIM(B2)

google sheets trim function1

 

Related Posts

Google Sheets FLOOR Function

This post will guide you how to use Google Sheets FLOOR function with syntax and examples. Description The Google Sheets FLOOR function returns a number rounded down to the nearest multiple of significance. So it will return a rounded number. ...

Google Sheets EXP Function

This post will guide you how to use Google Sheets EXP function with syntax and examples. Description The Google Sheets EXP function returns e raised to the power of a number.  The constant e is equal to 2.71828182845904, and it ...

Google Sheets FACT Function

This post will guide you how to use Google Sheets FACT function with syntax and examples. Description The Google Sheets FACT function returns the factorial of a given number.  The factorial of a given number is equal to 1*2*3…* number. ...

Google Sheets EVEN Function

This post will guide you how to use Google Sheets EVEN function with syntax and examples. Description The Google Sheets EVEN function rounds a given number up to the nearest even integer. You can use the EVEN function to return ...

Google Sheets COUNTBLANK Function

This post will guide you how to use Google Sheets COUNTBLANK function with syntax and examples. Description The Google Sheets COUNTBLANK function use to count the number of empty cells in a range of cells. You can use the COUNTBLANK ...

Sidebar