Skip to main content

How to remove leading and trailing spaces in Excel?

Author: Zhoumandy Last Modified: 2024-05-13

In the world of data management, tidiness is key. Yet, pesky leading and trailing spaces can often sneak into your Excel sheets, causing discrepancies and headaches. Fortunately, Excel offers handy tools to swiftly eliminate these unnecessary spaces, ensuring your data stays clean and accurate. In this article, we'll explore two efficient methods to remove leading and trailing spaces in Excel.

Using the TRIM function in Excel to remove leading and trailing spaces

Quickly remove all leading and trailing spaces with Kutools for Excel


Using the TRIM function in Excel to remove leading and trailing spaces

Here is the generic formula of TRIM function:

=TRIM (text)
Step 1: Input the TRIM formula

In cell C2, apply the following formula, then press the Enter button.

=TRIM(A2)
Step 2: Copy the formula down to below cells to get all results

Tip: The TRIM function will not remove all space characters.

Easily change negative numbers to positive in the specified range in Excel

Comparing to removing the negative sign from cells one by one manually, Kutools for Excel's Change Sign of Values feature provides an extremely easy way to quickly change all negative numbers to positive in selection. Get a 30-day full-featured free trial now!

ad convert negative to positive

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Quickly remove all leading and trailing spaces with Kutools for Excel

Compare with the TRIM function in Excel, the Removing Spaces utility in Kutools for Excel provides more flexible way to remove all leading and trailing spaces in Excel. You can directly remove the space in the cell without moving them into other cells. More important, you can remove other kind of space in the cell, such as all excess space, all space and so on.

Note: To apply this Remove Spaces feature, firstly, you should download and install Kutools for Excel.

1. Select the cells that you want to modify. You can select some columns, rows or the entire worksheet.

2. Click Kutools > Text > Remove Spaces, and check the Leading & Trailing spaces option in the popup Remove Spaces dialog. Click OK.

Now you will see all leading and trailing spaces are removed instantly!

Tip: To use this feature, you should install Kutools for Excel first, please click to download and have a 30-day free trial now.
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks. It helped me a lot
This comment was minimized by the moderator on the site
Respected Sir, Thank you so much for this great excel application. I had a big sheet & this apps make my work so easy. Thank you sir
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations