How to Remove Spaces in Google Sheets (Leading, Trailing, and Double Spaces)

Video google sheet trim whitespace

Have you ever been frustrated by those pesky extra spaces that clutter your cells when working with text or numeric data in Google Sheets? Well, fear no more because Google Sheets has a solution! In this article, I will show you some simple and effective methods to remove spaces in Google Sheets. Hang tight, we’re about to dive in!

The Google Sheets TRIM Whitespace Option

Google Sheets never stops adding new features, and one of them allows you to remove spaces from cells in just two clicks. This option is designed to remove leading, trailing, and double spaces. Here’s how it works:

  1. Select the data from which you want to remove the extra spaces.
  2. Click on the “Data” tab.
  3. In the options that appear, click on the “Trim whitespace” option.
    Click on Trim Whitespaces

With these simple steps, all leading, trailing, and double spaces will be removed. A pop-up window will inform you of the number of spaces removed. This is by far the easiest method to eliminate extra spaces in Google Sheets.

Using the TRIM Function to Remove Spaces

In most cases, using the TRIM function in Google Sheets will help you get rid of leading, trailing, and double spaces in your dataset. Here’s the formula to use:

=TRIM(A2)

Copy this formula into all the cells of the column to get the desired result. This function is particularly useful for ensuring data consistency in search formulas.

Removing Spaces with the Find and Replace Function

Sometimes, you may not want to use a formula because it would require an additional column to get the result. You can then use the Find and Replace function to remove leading, trailing, or spaces between words. Here’s how it’s done:

  1. Select the cells containing the names with double spaces.
  2. With the selected data, hold down the Ctrl key and press the H key (or Command + H if you’re using a Mac) to open the “Find and Replace” dialog.
  3. In the “Find” field, enter two spaces.
    Enter two spaces in the Find field
  4. In the “Replace” field, enter a single space.
    Enter a space in the Replace field
  5. Click the “Replace all” button.
    Click on Replace all
  6. Continue clicking the “Replace all” button until you see the message “No matches found” displayed above the button.

Using the SUBSTITUTE Function to Remove Spaces

The SUBSTITUTE function works similarly to the Find and Replace tool as it allows you to find and modify data. Here’s how to use it to remove spaces:

  1. Type =SUBSTITUTE in an empty cell.
  2. Click or enter the cell containing the spaces to be removed, then press the comma key.
  3. Use quotation marks to indicate the spaces to be removed in the first argument of the formula, then press the comma key.
  4. Use a second set of quotation marks with no space between them, then press the Enter key.

This tells Google Sheets to replace two spaces with no space.

Using an Extension to Remove Spaces

Several extensions enable you to remove spaces with just one click. One of these extensions is Power Tools for Google Sheets. Here’s how to use it:

  1. Install the extension by going to “Extensions > Add-ons > Get add-ons”, then search for “Power Tools” and click “Install.”
  2. Go to “Extensions > Add-ons > Power Tools.”
  3. Click on “Remove.”
  4. Check the “Remove all spaces” box and click “Remove” again.

FAQ about Removing Spaces in Google Sheets

How do I remove empty spaces in Google Sheets?

There are several methods, but the best ones involve using the TRIM function or the Trim Whitespace option in the Data menu.

How do I remove special characters and spaces in Google Sheets?

You can use the SUBSTITUTE function to identify the special characters to be removed and replace them with whatever you want. You can also use Google Sheets’ Find and Replace tool to achieve the same goal.

And there you have it! You now know three different methods to remove unnecessary spaces in Google Sheets (leading, trailing, and double spaces). The easiest method is to use the Trim Whitespace option, but you can also use the TRIM function or the Find and Replace function. I hope this tutorial has been helpful to you! If you’d like to learn more about Google Sheets, head over to Crawlan.com for more exciting tutorials.

Related posts