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
google sheets floor function1

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
google sheets exp function1

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
google sheets FACT function1

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
google sheets even function1

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
google sheets countblank function1

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 ...

Google Sheets DEGREES Function
google sheets degrees function1

This post will guide you how to use Google Sheets DEGREES function with syntax and examples. Description The Google Sheets DEGREES function converts radians into degrees. And it will return a numeric value. For examples, if you pass the PI() function into ...

Google Sheets COSH Function
google sheets cosh function1

This post will guide you how to use Google Sheets COSH function with syntax and examples. Description The Google Sheets COSH function returns the hyperbolic cosine of a given angle. The purpose of this function is used to get hyperbolic ...

Google Sheets COS Function
google sheets cos function1

This post will guide you how to use Google Sheets COS function with syntax and examples. Description The Google Sheets COS function returns the cosine of a given angle. If you want to supply an angle to COS function in ...

Google Sheets COMBINA Function
google sheets combina function1

This post will guide you how to use Google Sheets COMBINA function with syntax and examples. Description The Google Sheets COMBINA function returns the number of combinations for a given number of items and it includes repetitions. You can use ...

Google Sheets COMBIN Function
google sheets combin function1

This post will guide you how to use Google Sheets COMBIN function with syntax and examples. Description The Google Sheets COMBIN function returns the number of combinations for a given number of items. And you can use the COMBIN function ...

Sidebar