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?
|Kutools for Excel's Remove Spaces can remove leading spaces, trailing spaces, excess spaces or all spaces from a range cells.|
Here I can introduce a formula for you to quickly count the total number of characters excluding spaces in a cell.
|Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group
as auto text, and liberate your brain! Click here to know Auto Text Click here to get free trial
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.
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 120 handy Excel functions, enhance your working efficiency and save your working time.|
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.
- 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?