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 TODAY Function
google sheets today function

This post will guide you how to use Google Sheets TODAY function with syntax and examples. Description The Google Sheets TODAY function get the current date as a date value. And it will be updated each time when your worksheet ...

Google Sheets TIME Function
google sheets time function1

This post will guide you how to use Google Sheets TIME function with syntax and examples. Description The Google Sheets TIME function converts an hour, minute and second into a time. The TIME function can be used to create a ...

Google Sheets SECOND Function
google sheets second function1

This post will guide you how to use Google Sheets SECOND function with syntax and examples. Description The Google Sheets SECOND function returns the seconds of a time value. Or returns an integer value that represent the second component of ...

Google Sheets NOW Function
google sheets now function1

This post will guide you how to use Google Sheets NOW function with syntax and examples. Description The Google Sheets NOW function returns the serial number of the current date and time. And it will be updated each time when ...

Google Sheets NETWORKDAYS.INTL Function
google sheets networkdays.intl function1

This post will guide you how to use Google Sheets NETWORKDAYS.INTL function with syntax and examples. Description The Google Sheets NETWORKDAYS.INTL function returns the number of net working days between tow given days excluding specified weekend days and holidays. The ...

Google Sheets NETWORKDAYS Function
google sheets networkdays function1

This post will guide you how to use Google Sheets NETWORKDAYS function with syntax and examples. Description The Google Sheets NETWORKDAYS function returns the number of net working days between tow given days. The NETWORKDAYS function can be used to ...

Google Sheets MONTH Function
google sheets month function1

This post will guide you how to use Google Sheets MONTH function with syntax and examples. Description The Google Sheets MONTH function returns the month of a date represented by a serial number. And the month is an integer number ...

Google Sheets MINUTE Function
google sheets minute function1

This post will guide you how to use Google Sheets MINUTE function with syntax and examples. Description The Google Sheets MINUTE returns the minutes of a time value. And the minutes is an integer number from 0 to 59. So ...

Google Sheets ISOWEEKNUM Function
google sheets isoweeknum function1

This post will guide you how to use Google Sheets ISOWEEKNUM function with syntax and examples. Description The Google Sheets ISOWEEKNUM returns the number of the ISO week of the year for a given date. ISO weeks begin on Monday ...

Google Sheets HOUR Function
google sheets hour function1

This post will guide you how to use Google Sheets HOUR function with syntax and examples. Description The Google Sheets HOUR returns the hour of a time value. Or returns an integer value that represent the hour component of a ...

Sidebar