How to count the number of characters excluding spaces in Excel cell?
In general, when you count the number of characters in a cell, it will count including the spaces. But in some cases, what we need is to count the number of characters excluding spaces in a single cell, how can you quickly handle it in Excel?
Count number of characters excluding spaces with formula
Remove all spaces of a cell then count the characters in a cell with Kutools for Excel
Count number of characters excluding spaces with formula
Here I can introduce a formula for you to quickly count the total number of characters excluding spaces in a cell.
1. Select a cell which will output the counted result, for instance, C1, and type this formula =LEN(SUBSTITUTE(A1," ","")), and press Enter key to get the result. If you need, you can drag the autofill handle over the cells needed the formula.


Tip: In the formula, A1 is the cell you want to count the total number of characters excluding spaces.
Remove all spaces of a cell then count the characters in a cell with Kutools for Excel
If you like use the most easiest =LEN() formula to count the characters of a cell excluding spaces, you can apply Kutools for Excel’s Remove Spaces function to remove all spaces then count.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. |
After free installing Kutools for Excel, please do as below:
1. Select the cells you want to count the total number of characters from each cell, and click Kutools > Text > Remove Spaces. See screenshot:
2. In the Remove Spaces dialog, check All spaces option, and you can preview the results form Preview pane. See screenshot:
3. Click Ok, and all the spaces are removed from each cell. Then select a blank cell, for instance, C1, and type =LEN(A1), and press Enter key, and drag autofill handle over the cells which need this formula.


With Kutools for Excel’s Remove Spaces, you can remove all leading spaces, trailing space, extract spaces, leading and trailing space from each cell as you need.
Relative Articles:
- How to remove certain/specific character from cell in Excel?
- How to remove line shapes in Excel?
- How to count a character in a cell or range in Excel
- How to count frequency of a text/number/character in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!




