Excel Guides

Getting Rid of Spaces in Cells in Excel

If you have a lot of data in an Excel spreadsheet, you may want to get rid of some of the spaces in cells to make the data easier to work with. Here are a few ways to do this:

1. Use the TRIM function

The TRIM function is a built-in function in Excel that can be used to remove spaces from cells. To use it, select the cell or range of cells that you want to trim, then click on the Formulas tab > Text group > TRIM button. This will remove any leading, trailing, or extra spaces between words in the selected cells.

2. Use the SUBSTITUTE function

The SUBSTITUTE function can also be used to remove spaces from cells in Excel. To use it, select the cell or range of cells that you want to substitute, then click on the Formulas tab > Text group > SUBSTITUTE button. In the dialog box that appears, enter a space in the "Find what" field and leave the "Replace with" field blank. This will replace all spaces in the selected cells with nothing, effectively removing them.

3. Use Find and Replace

You can also use Excel's Find and Replace feature to remove spaces from cells. To do this, select the cell or range of cells that you want to search, then click on the Home tab > Editing group > Find & Select button > Replace. In the dialog box that appears, enter a space in the "Find what" field and leave the "Replace with" field blank. Then click on the Replace All button. This will replace all spaces in the selected cells with nothing, effectively removing them.

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.