Title: How to remove blank spaces in Excel - leading, trailing, non-breaking
Headings: How to remove spaces in Excel - leading, trailing, non-breaking
How to remove spaces in Excel - leading, trailing, non-breaking
How to remove blank spaces in Excel - leading, trailing, between words
=TRIM (A2)
How to delete line breaks and nonprinting characters
=TRIM (CLEAN (A2))
How to remove non-breaking spaces in Excel
=TRIM (SUBSTITUTE (A2, CHAR (160), " "))
=TRIM (CLEAN ( (SUBSTITUTE (A2,CHAR (160)," "))))
How to delete a specific non-printing character
=TRIM (SUBSTITUTE (SUBSTITUTE (A2, CHAR (127), " "), CHAR (160), " ")))
How to remove all spaces in Excel
=SUBSTITUTE (A2, CHAR (32), "")
=SUBSTITUTE (A2," ","")
How to count spaces in Excel
=LEN (A2)-LEN (SUBSTITUTE (A2," ",""))
=LEN (A2)-LEN (TRIM (A2))
Formula-free way to remove spaces and clean data
You may also be interested in

Content: There are several ways to remove spaces from string, and this tutorial will help you choose the technique best suited for your particular task and the data type you are working with. Remove spaces in Excel (leading, trailing, extra spaces between words)
Delete line breaks and non-printing characters
Remove non-breaking spaces ( )
Delete a specific non-printing character
How to remove all spaces in Excel
How to count spaces in Excel
Text Toolkit - quick way to trim spaces and clean data
How to remove blank spaces in Excel - leading, trailing, between words
If your data set contains superfluous spaces, the Excel TRIM function can help you delete them all in one go - leading, trailing and multiple in-between spaces, except for a single space character between words. A regular TRIM formula is as simple as this: =TRIM (A2)
Where A2 is the cell you want to delete spaces from. As shown in the following screenshot, the Excel TRIM formula successfully eliminated all spaces before and after the text as well as consecutive spaces in the middle of a string. And now, you only need to replace values in the original column with trimmed values. The easiest way to do this is using Paste Special > Values, the detailed instructions can be found here: How to copy values in Excel. Additionally, you can use the Excel TRIM function to remove leading spaces only, keeping all spaces in the middle of a text string intact. The formula example is here: