Title: How to Use Excel TRIM Function to Remove Spaces and Clean Data
Headings: How to Use Excel TRIM Function to Remove Spaces and Clean Data
How to Use Excel TRIM Function to Remove Spaces and Clean Data
Excel TRIM Function – An Overview
When to use Excel TRIM Function
What it Returns
Syntax
Input Arguments
Excel TRIM Function – Examples
Example 1 – Remove Leading, Trailing, and Double Spaces
Example 2 – Remove Leading Spaces Only
How does this formula work?
Example 3 – Correctly Count Number of words when there are Additional spaces
Related Excel Functions:

Content: How to Use Excel TRIM Function to Remove Spaces and Clean Data
How to Use Excel TRIM Function to Remove Spaces and Clean Data
-- By Sumit Bansal
Excel TRIM Function – An Overview
When to use Excel TRIM Function
Excel TRIM Function is best suited for situations when you need to clean the dataset by removing leading, trailing, and double spaces. What it Returns
It returns the text string where all the leading, trailing, and double spaces have been removed. Syntax
=TRIM (text)
Input Arguments
Here, ‘text’ is the text string from which you want to remove the extra spaces. This could either be entered manually (within double quotes) or can be a cell reference that contains the text string. For example, if you want to remove extra spaces from the text in cell A1, then you can use the formula =TRIM (A1)
Excel TRIM Function – Examples
The best way to understand how useful Excel TRIM function can be would be to see it in action. Here are three practical examples of using the TRIM function. Example 1 – Remove Leading, Trailing, and Double Spaces
TRIM function is made to do this. Below is an example where there are leading, trailing, and double spaces in the cells. You can easily remove all these extra spaces by using the below TRIM function: =TRIM (A1)
Copy-paste this into all the cells and you are all set.