Title: TRIM in Excel (Formula, Examples) | How to Use Excel TRIM Function?
Headings: Excel TRIM Function
Excel TRIM Function
Excel TRIM Function (Table of Contents)
TRIM in Excel
TRIM Formula in Excel
Trim function arguments
Shortcut of using the formula
Steps for using the Trim function in Excel
How to Use the TRIM Function in Excel?
Example #1
Example #2
Explanation of the TRIM Function in Excel
=LEN (A16)-LEN (TRIM (A16))
=LEN (A16)-LEN (SUBSTITUTE (A16,” “,””))
Things to Remember
Recommended Articles

Content: Press the Enter, and the result will look like
Example #2
Normally when we fetch data in excel from another application or any database like SQL Server, Oracle, HTML, we face such type issue for line breaking with extra space; we can say that double line issue or wrap text issue, and also ever include with a special character which is not removed with only trim. So we can use a trim function with a clean function for such type situations. Example showing as below mention pictures. So now we can use a trim function with a clean function. Write the formula =TRIM (CLEAN (A16))
The Result is : The cursor Position to the lower right corner of the formula cell (B16 in this example)
Select the range and fill down the column with the formula. The Result is: Then you need to copy and paste values only, not formulas like in the first example. Explanation of the TRIM Function in Excel
Before removing spaces in data, if we want to know how much extra space or total space in the excel sheet, we get the LEN function’s help with a trim function.