LiveFlow raises $13.5 million Series A led by New York-based Valar Ventures and launches LiveFlow Next to revolutionize accounting!
Read More
Arrow
Back to guides
Google Sheets Formulas

How to Trim Whitespaces in Google Sheets

In this article, you will learn how to remove extra spaces with the TRIM functionin Google Sheets. The function is beneficial when you need to clean up a data set as a preparation to use other functions such as COUNTIF or SUMIF.

How to use the TRIM formula in Google Sheets

  • Type “=TRIM(” or go to “Insert” “Function”“Text”“TRIM”.

  • Select a text from which you remove extra whitespaces

Insert the TRIM function
How to insert the TRIM function from the menu bar in Google Sheets

The generic syntax is as follows:

“=TRIM(text)”

Text: You can refer to a cell containing a text you want to trim or type in the text directly.

The TRIM function can delete whitespaces in front of or at the end of a text string. It also removes the extra spaces between words to leave a single space.

Why spend hours creating spreadsheets, when we have already done the work for you?
100+ financial spreadsheet templates, all free and ready for you now.
Free Spreadsheet Templates

Assume you are a marketing manager and looking at customer survey data. As each form was filled by an individual customer, you see typos, especially extraneous spaces in the customer’s name section. So, you want to clean them up by using the TRIM function.

Use the TRIM formula 
How to use the TRIM formula in Google Sheets with an example

Another way to trim whitespaces

If the number of texts you will clean up is small, you can do it manually. However, if the number is large, instead of using the TRIM function, you can take the following approach: go to the “Data” tab → “Data cleanup”“Trim whitespaces”.

The “Trim whitespaces” effect is the same as the TRIM function; it removes any spaces ahead of or at the end of text strings or takes extra whitespaces between two words to leave only single whitespace.

Turn Quickbooks Online data into a Google Sheets dashboard
100+ templates, update automatically, totally secure!
Book a Demo

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Cta Photo

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how!

Get personal help

We guarantee you personal help on chat or Zoom within maximum 6 hours between 9am and 10pm EST.
Blue Tick
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below

Supercharge your financial reporting today

See LiveFlow in action and discover how to streamline your workflows.