Title: Excel TRIM function - quick way to remove extra spaces
Headings: Excel TRIM function - quick way to remove extra spaces
Excel TRIM function - quick way to remove extra spaces
TRIM function - remove extra spaces in Excel
TRIM (text)
=TRIM (A1)
=TRIM (CLEAN (A1))
How to use TRIM function in Excel - formula examples
How to trim spaces in an entire column of data
How to remove leading spaces in a numeric column
=VALUE (TRIM (A2))
How to remove only leading spaces in Excel (Left Trim)
=MID (A2,FIND (MID (TRIM (A2),1,1),A2),LEN (A2))
How to count extra spaces in a cell
=LEN (A2)-LEN (TRIM (A2))
How to highlight cells with excess spaces
=LEN ($A2)>LEN (TRIM ($A2))
Excel TRIM not working
=TRIM (SUBSTITUTE (A1, CHAR (160), " "))
=TRIM (CLEAN (SUBSTITUTE (A1, CHAR (160), " ")))
Leading space: =CODE (LEFT (A1,1))
Trailing space: =CODE (RIGHT (A1,1))
=CODE (MID (A1, n, 1)))
=TRIM (SUBSTITUTE (A1, CHAR (9), " "))
Trim Spaces for Excel - remove extra spaces in a click
Available downloads
You may also be interested in

Content: Yep, it's that simple! If in addition to extra spaces, your data contains line breaks and non-printing characters, use the TRIM function in combination with CLEAN to delete the first 32 non-printing characters in the in the 7-bit ASCII code system. For example, to remove spaces, line breaks and other unwanted characters from cell A1, use this formula: =TRIM (CLEAN (A1))
For more information, please see How to remove non-printing characters in Excel
How to use TRIM function in Excel - formula examples
Now that you know the basics, let's discuss a few specific uses of TRIM in Excel, pitfalls that you may face and working solutions. How to trim spaces in an entire column of data
Supposing you have a column of names that have some whitespace before and after the text, as well as more than one spaces between the words. So, how do you remove all leading, trailing and excess in-between spaces in all cells at a time? By copying an Excel TRIM formula across the column, and then replacing formulas with their values. The detailed steps follow below. Write a TRIM formula for the topmost cell, A2 in our example: =TRIM (A2)
Position the cursor to the lower right corner of the formula cell (B2 in this example), and as soon as the cursor turns into the plus sign, double-click it to copy the formula down the column, up to the last cell with data.