Skip to main content

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


arrow blue right bubble 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.

doc count excluding spaces 1
doc count excluding spaces 2

Tip: In the formula, A1 is the cell you want to count the total number of characters excluding spaces.


arrow blue right bubble 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:

doc count excluding spaces 3

2. In the Remove Spaces dialog, check All spaces option, and you can preview the results form Preview pane. See screenshot:

doc count excluding spaces 4

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.

doc count excluding spaces 5
doc count excluding spaces 6

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:


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (4)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
I got error, why ? https://prnt.sc/FOwtZRDr0_1q
This comment was minimized by the moderator on the site
Hi, Ozan Ozen, which Excel verison you used and which language of your data?
This comment was minimized by the moderator on the site
Hi,
here is the my excel version: Microsoft® Excel® for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20078) 32-bit

also I solved my problem with below formula. FYI:

=SUM(LEN(SUBSTITUTE(C199;" ";"")))

Regards,
Rated 5 out of 5
This comment was minimized by the moderator on the site
It is almost complicated like solving the worlds problems. Just push "control, shift, c."
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations