How To Remove Spaces In Google Sheets

Google Sheets is a powerful and free spreadsheet tool. Many individuals, organizations, and businesses have found Google Sheets to be an invaluable addition to their collection of productivity tools. While it may not be quite as powerful as paid programs like Excel, Sheets offers an extensive range of functionality with a smooth learning curve.

Speaking of features, this article will show you how to use Google Sheets’ find and replace tool and a handy add-on to erase empty spaces from cells in your spreadsheet.

How to Remove Spaces in Google Sheets

There are several ways to remove spaces from a Google Sheets spreadsheet, including built-in features as well as a helpful add-on. Each of these methods is effective, but some are better suited for certain situations. Take a look at your options below and choose the one that best suits your needs.

The TRIM Function

If you have cells or columns full of text entries and need to get rid of any leading and trailing spaces, you can use the TRIM function.

TRIM allows you to remove leading and trailing spaces from cells, along with any extra spaces in the text. For this example, open a new Google spreadsheet and input the value ‘   455   643  ‘ in cell B3 with three leading spaces, two trailing spaces, and three spaces between the numbers.

How To Remove Spaces In Google Sheets

Next, select cell B4 and click in the fx bar, then enter the function =TRIM(B3) in the fx bar and press Enter. Cell B4 will now include the same values as your original cell B3 with just one space between the numbers, as shown in the image above. ‘   455   643  ‘ becomes ‘455 643’ with the leading, trailing, and extra spaces removed.

The SUBSTITUTE Function

Google Sheets also has a SUBSTITUTE function that replaces text in cells. This feature enables users to modify cell content, and you can also use it to erase all cell spacing with the function.

The syntax for SUBSTITUTE is: SUBSTITUTE(text_to_search, search_for, replace_with, [occurrence_number]). It’s like a find and replace function that searches for text in a cell and replaces it with something else.

To configure this function to remove all spacing from a text string, click cell B5. Next, enter =SUBSTITUTE(B3, " ", "") in the function bar and press Enter. Now B5 will return the number 455643 without any spacing in the text string as shown directly below.

How To Remove Spaces In Google Sheets

If you need to copy that function to remove spacing from multiple cells, left-click the bottom-right corner of the cell that includes the SUBSTITUTE function and hold the button down. Then drag the cursor over the cells you need to copy the function to. A blue rectangle highlights the cells you’ve selected to copy the function to as shown in the example below.

How To Remove Spaces In Google Sheets

Google Sheets Find and Replace Tool

You may not want to add a bunch of formulas to your spreadsheet or have rows of extraneous data clogging up your display. If you want to just remove the spaces from the existing text, Google Sheets has a find and replace tool with which you can find and replace text.

This gives you a quick way to find and replace text in multiple cells. As such, the tool enables you to remove spacing from cells without adding additional functions to the spreadsheet. You can open the tool by selecting Edit and Find and replace from the menu.

As an example, select cell B3. Then press the Ctrl + H hotkey to open the Find and replace dialogue box shown in the example below. The pop-up window includes text boxes where you would usually enter some text or numbers to find and some text or numbers to replace them with. But in this case, your goal is to remove extra spacing, so click in the Find box and enter one space using your space bar.

How To Remove Spaces In Google Sheets

Next, press the Replace all button in the dialogue box, then click Done. This will remove all the spaces from cell B3. The text will also align to the right of the cell as Google Sheets thinks that the cell contains a number, and numbers right-align by default. As such, you might need to readjust the alignment as needed.

How To Remove Spaces In Google Sheets

Alternatively, you can remove excess spacing without erasing all the spaces. Click the Undo button to restore the original spacing in cell B3, then select cell B3 again. Press Ctrl + H, input a double space in the Find box, click Replace all, then click Done. This process reduces all trailing and leading spacing to one space and cuts the spacing between text to one space only.

Remove Spaces with the Power Tools Add-on

Google Sheets also has various add-ons that extend its options and tools. Power Tools is an add-on for Sheets with which you can remove spaces and delimiters from cells. Press the + Free button on the Google Sheets add-ons page to add Power Tools to Sheets.

Once you have added Power Tools to Google Sheets, select a cell on your spreadsheet to remove spaces from. Select Add-ons from the pull-down menu then Power Tools. Then select Remove to open the Power Tools sidebar shown in the snapshot below.

How To Remove Spaces In Google Sheets

Select Remove to open the remove spaces options shown below.

There are a number of options for clearing out spaces and other miscellaneous characters:

  • Remove all spaces removes all spacing from the cell
  • Remove leading and trailing spaces only removes the leading and trailing spaces
  • Remove spaces between words to one will retain the leading and trailing spaces but erase any extra spacing between words
  • Remove html entities removes any HTML tags
  • Remove all delimiters removes delimiters used to separate fields such as commas used in Comma Separated (CSV) files or tabs used in tab-delimited files

This feature’s a great way to clean up a Google Docs sheet to make it more useable, stripping out spacing and characters that might interfere with the data or text. For example, you may want to upload a list containing a number of fields in an Email Service Provider (ESP) and you need to clean up up the file before exporting it back to a CSV file to successfully upload to your ESP account.

Final Thoughts

So there are two functions and a built-in find and replace tool that you can use to remove extra spaces Google Sheets, as well as an add-on that includes this feature along with other useful tools for Google Sheets.

You might also be interested in How to combine cells in Google Sheets.

Have any Google Sheets tips and tricks? Please share them with us in the comments below!

Sign up and earn $1000 a day ⋙

Driver Booster 12 Free: Keep 9.5M+ Drivers Up-to-Date in 1-Click

Driver Booster 12 Free: Keep 9.5M+ Drivers Up-to-Date in 1-Click

Driver Booster 12 Free is an effective tool that will keep your computers drivers up to date, which will make the system run faster and more reliably. This driver updater from IObit keeps your PC running at its best by checking for lost, out-of-date, or broken drivers immediately.

Advanced SystemCare 17 Free Review 2024 - Your Best PC Optimizer

Advanced SystemCare 17 Free Review 2024 - Your Best PC Optimizer

In an era where digital efficiency is paramount, Advanced SystemCare 17 Free emerges as a beacon for those seeking to enhance their PC's performance.

Summary of Movies & TV application shortcuts on Windows 10

Summary of Movies & TV application shortcuts on Windows 10

Summary of Movies & TV application shortcuts on Windows 10, Summary of Movies & TV application shortcuts on Windows 10 to bring you a great experience. Maybe

How to fix Messages Failed to Load error on Discord for Windows

How to fix Messages Failed to Load error on Discord for Windows

How to fix Messages Failed to Load error on Discord for Windows, Discord isn't fun if you can't read what other people write. Here's how to fix Messages error

How to display the This PC icon on the Windows 11 desktop

How to display the This PC icon on the Windows 11 desktop

How to display the This PC icon on the Windows 11 desktop, During the process of using Windows 11, many users need to access This PC (management).

How to find information in the Windows Registry quickly

How to find information in the Windows Registry quickly

How to find information in the Windows Registry quickly, Do you find it difficult to find information in the Windows Registry? So below are quick ways to find the registry

How to limit the number of failed login attempts on Windows 10

How to limit the number of failed login attempts on Windows 10

How to limit the number of failed login attempts on Windows 10. Limiting the number of failed password login attempts on Windows 10 helps increase computer security. Here's how

How to create fake error messages in Windows

How to create fake error messages in Windows

How to create fake error messages in Windows, Windows can come up with some pretty creative error messages but why don't you try creating your own content for them to make fun of?

Ways to open Windows Tools in Windows 11

Ways to open Windows Tools in Windows 11

Ways to open Windows Tools in Windows 11, Windows Administrative Tools or Windows Tools are still useful on Windows 11. Here's how to find Windows Tools in Windows 11.

How to fix Windows Quick Assist not working error

How to fix Windows Quick Assist not working error

How to fix Windows Quick Assist not working error, Windows Quick Assist helps you connect to a remote PC easily. However, sometimes it also generates errors. But,

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar, How to pin Office files to the taskbar icon on Windows 11? Invite

How to fix the error of not being able to install software on Windows

How to fix the error of not being able to install software on Windows

How to fix the error of not being able to install software on Windows, Why can't you install apps or software on Windows 10/11? Here's everything you need to know about how to fix it

Instructions for deleting or changing PIN on Windows 11

Instructions for deleting or changing PIN on Windows 11

Instructions for deleting or changing the PIN code on Windows 11, In Windows 11, the PIN code is a very useful and convenient security tool for users. However some people

How to fix There Are Currently No Power Options Available error in Windows 10

How to fix There Are Currently No Power Options Available error in Windows 10

How to fix There Are Currently No Power Options Available error in Windows 10, Can't select power mode in Windows 10, what should I do? Here's how to fix the error

The simplest way to fix Photos application errors on Windows 10

The simplest way to fix Photos application errors on Windows 10

The simplest way to fix Photos app errors on Windows 10, what should I do if Microsoft Photos doesn't work? Don't worry about ways to fix Photos app errors on Windows

Instructions for installing keyboard shortcuts to switch input languages ​​on Windows 11

Instructions for installing keyboard shortcuts to switch input languages ​​on Windows 11

Instructions for installing shortcuts to switch input languages ​​on Windows 11. During the process of using Windows, users will often have to switch between methods.

How to check supported power status on Windows 11

How to check supported power status on Windows 11

How to check power status is supported on Windows 11, Windows 11 can handle many different power states. Here's how to check the power status

How to switch from 2.4GHz to 5GHz in Windows 10

How to switch from 2.4GHz to 5GHz in Windows 10

How to switch from 2.4GHz to 5GHz in Windows 10, If you want to find a quick and simple way to speed up the Internet, changing the WiFi band from 2.4GHz to 5GHz may help.

How to fix Not Enough Memory to Run Microsoft Excel error on Windows

How to fix Not Enough Memory to Run Microsoft Excel error on Windows

How to fix Not Enough Memory to Run Microsoft Excel error on Windows, Are you having an error of not enough memory to run Microsoft Excel? So, how to fix Not Enough Memory error

Ways to find all video files on Windows

Ways to find all video files on Windows

Ways to find all video files on Windows, Can't find recorded and saved videos on PC. Below are ways to help you find all clips on Windows.