how to remove spaces in a column in excel

Remove Spaces in Excel Column: Step-by-Step Guide

By Steven Miller
AD

Imagine you're working on a Microsoft Excel spreadsheet, and you've noticed that one of your columns is riddled with unwanted spaces. Perhaps they're causing your data to display incorrectly or interfering with your formulas. Whatever the reason, removing these spaces is crucial. This guide will walk you through the process, step by step, to remove spaces in a column in Excel.

Before we dive into the methods, let's ensure we're on the same page. For this guide, we'll be dealing with Excel for Windows. While the steps are similar for Mac users, some buttons or menu items may differ. Now, let's explore two effective ways to tackle this issue: using Find and Replace and using Flash Fill.

Using Find and Replace

The Find and Replace feature is a tried-and-true method that's both simple and effective. It allows you to search for specific text or characters and replace them with something else, or simply remove them.

AD
How to Hide Columns in Excel Without Deleting Data
How to Hide Columns in Excel Without Deleting Data
How to Delete a Column in Excel Step by Step
How to Delete a Column in Excel Step by Step
Resize Rows and Columns
Resize Rows and Columns

Let's start by launching the Find and Replace tool:

Accessing Find and Replace

If you're using Excel 2016 or later, click on the 'Home' tab in the ribbon. In the 'Editing' group, click on 'Find & Select' and then click on 'Replace'. For older versions, go to the 'Edit' menu and click on 'Replace'.

Autofit Rows and Columns in Excel with VBA
Autofit Rows and Columns in Excel with VBA
Hidden Rows and Columns in Excel: The Art of Concealment
Hidden Rows and Columns in Excel: The Art of Concealment
How to remove space from Excel easily
How to remove space from Excel easily

Removing Spaces

In the 'Find and Replace' dialog box, in the 'Find what' field, press and hold the Ctrl key, then press the spacebar once. This tells Excel to look for spaces. Leave the 'Replace with' field empty. Click on 'Replace All'.

Excel will remove all spaces from the selected cells and display a message telling you how many replacements were made. Click 'OK' to close the dialog box.

AD

Using Flash Fill

Introduced in Excel 2013, Flash Fill is a powerful tool that automatically enters data based on patterns it detects. It's particularly useful when you have multiple rows of data that follow a consistent structure.

How to Collapse Columns in Excel (6 Easy Ways) - ExcelDemy
How to Collapse Columns in Excel (6 Easy Ways) - ExcelDemy
Unhide Missing Columns in Excel
Unhide Missing Columns in Excel
How to Hide Columns in Excel Without Deleting Your Data
How to Hide Columns in Excel Without Deleting Your Data
Excel Insert Column Left Rule for Beginners
Excel Insert Column Left Rule for Beginners
How to delete all blank columns in your worksheet at once using Go To Special. 🕺
How to delete all blank columns in your worksheet at once using Go To Special. 🕺
Select Rows & Columns Fast in Excel
Select Rows & Columns Fast in Excel

For our purposes, we'll use Flash Fill to create a new column with the spaces removed, then replace the old column with the new one.

Creating a New Column

In a new column (e.g., Column B if your data starts in Column A), enter a space in the first cell (B1), then drag the fill handle down to copy this space to the rest of the cells.

AD

Using Flash Fill

Select the entire new column, then click on the 'Data' tab in the ribbon. In the 'Data Tools' group, click on 'Flash Fill'. Excel will scan the column, detect the pattern, and automatically replace the spaces with the corresponding data from the original column.

ExcelTips
ExcelTips
Microsoft Excel: Hide Columns and Rows Step by Step
Microsoft Excel: Hide Columns and Rows Step by Step
How to Remove Blank Spaces in Excel -7 Methods - ExcelDemy
How to Remove Blank Spaces in Excel -7 Methods - ExcelDemy

To replace the original column with the new one, select the original column (Column A), click on the right border of the column header to select the entire column. Right-click and select 'Delete Sheet Columns'. The data from the new column will remain.

And there you have it! Two effective methods to remove spaces from a column in Excel. Both methods are simple and efficient, and you can choose the one that best suits your working style. Now that you've cleaned up your data, why not explore some of Excel's more advanced features to further streamline your workflow? Happy data crunching!

AD
AD