Counting characters excepting spaces using excel formula

The easy way to count the characters in a text, without counting the spaces too, is to use the LEN excel formula on a string text that has the spaces removed.

Removing spaces before counting characters

Removing spaces inside a text is done by using the SUBSTITUTE formula with the following expression:

=SUBSTITUTE(“text where you need to replace spaces”,” “,””)

In this way spaces (” “) will be replaced with nothing (“”), resulting a string that has only the remaining characters.

Using LEN you can now find the number you are looking for:

=LEN(SUBSTITUTE(“text where you need to replace spaces”,” “,””))

counting characers without spaces

Good luck making Excel formula your friend!

 

Write a Reply or Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.