Sometimes, you might find yourself with data containing extra spaces. This is especially common if you’re moving between different versions of spreadsheet software. Fortunately, there’s an easy fix. Let’s learn how to use trimming in Microsoft Excel.
How to Use Trimming in Excel
You’ve received a list of names, but there’s a problem. Instead of the customary one space between first and last, you’re seeing three!
Luckily, you don’t have to worry about retyping the names, or clicking into individual cells to manually backspace or delete the extra spaces. Excel is a built-in TRIM function, and it’s here to help in scenarios just like this. The TRIM function seeks any instance of multiple adjacent spaces, and then automatically removes all but one of them.
To get started trimming in Excel, click into an empty cell. It’s easy to choose one immediately beside the data, but you can use any cell that you want. Begin by typing an = sign. This simply tells Excel that you’re beginning to input a formula. In this case, you’ll be working with the TRIM function, so continue by typing TRIM(.
So far, your formula should read:
Now, you need to click into the cell containing the extra spaces. Here, that’s cell C1. Complete your formula by closing the parentheses with ). Your complete formula is:
Hit Enter on your keyboard, and you’ll see the name appear, with single-spaced text. The extra two spaces have been removed, and the text copies into the cell where you placed your formula.
From here, you can click and drag on the lower right corner of cell D1 to copy the formula down through the remainder of your list.
As you can see, this is just another way that Excel can easily clean up and transform data with minimal effort needed.